Open baba1587 opened 3 years ago
you can add x = torch.randn(2,64,5,6) -> x = torch.randn(2,64,5,6).cuda() and model = model.cuda()
or you can remove .cuda() in def INF(B,H,W): return -torch.diag(torch.tensor(float("inf")).cuda().repeat(H),0).unsqueeze(0).repeat(B*W,1,1)
OK it works thank you
hello i met this problem and please u to see . 1 x = torch.randn(2,64,5,6) 2 ----> 3 y = model(x)
1 frames /usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in call(self, *input, kwargs) 475 result = self._slow_forward(*input, *kwargs) 476 else: --> 477 result = self.forward(input, kwargs) 478 for hook in self._forward_hooks.values(): 479 hook_result = hook(self, input, result)