So, to() received an invalid combination of arguments. This happened if we pass a string (“cuda:0”) and an int (0). One of the right approaches to to() is shown as in the message:
(torch.device device, torch.dtype dtype, bool non_blocking, bool copy, *, torch.memory_format memory_format)
Can you try this as here, we try to create a torch.device first?
cuda0 = torch.device(‘cuda:0’)
adaptive = robust_loss_pytorch.adaptive.AdaptiveLossFunction(num_dims = 4, float_dtype=torch.cuda.FloatTensor, device=cuda0 )