Hi,
You can allocate any torch tensor/model in gpu by calling
tensor = tensor.cuda()
or
tensor = tensor.to(device)
being device = torch.device(‘cpu’) or torch.device(‘cuda:0’)
It means you simply have to use model=model.cuda()/to(device) and to do the same with your input, your ground truth and your loss