The PyTorch version 0.3.0 I am using gives me an error with the following line.
loss = torch.zeros(1).to(pred_traj_gt)
AttributeError: 'torch.FloatTensor' object has no attribute 'to'

What should I replace the code with ? This is someone else code I am trying to run to understand. My GPU only allows me to use 0.3.0 so I cannot upgrade PyTorch. What should I replace the code with to have the same functionality ?