解决PyTorch报错:RuntimeError: Expected object of backend CPU but got backend CUDA for argument #2 'other
1. 问题描述在利用PyTorch报错:RuntimeError: Expected object of backend CPU but got backend CUDA for argument #2 'other'报错时,对应Python语句的写法为:szl = torch.max(sz.round(), torch.Tensor([2])).long()2. 解决办法...