When working on GPU, we need to do something similar to:
x.cuda()
where x can be a model or input variables.
I was wondering why is it not done for loss criteria?
criterion = nn.MSELoss()

# why is the below line not implemented?
if torch.cuda.is_available(): criterion.cuda()

Does the criterion somehow infer whether or not to use cuda from the model?