Focal Loss error: no implementation found for 'torch.nn.functional.cross_entropy'

Thanks
I have solved using torch.as_tensor().