kchengiva / Shift-GCN

The implementation for "Skeleton-Based Action Recognition with Shift Graph Convolutional Network" (CVPR2020 oral).
Other
269 stars 55 forks source link

RuntimeError: Only Tensors of floating point dtype can require gradients #29

Open BrownStorm opened 3 years ago

BrownStorm commented 3 years ago

您好 我在使用两张卡运行时会出现这个错误:

Traceback (most recent call last): File "main.py", line 541, in processor.start() File "main.py", line 482, in start self.train(epoch, save_model=True) File "main.py", line 370, in train output = self.model(data) File "/home/Liutl/anaconda3/envs/sgcn/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in call result = self.forward(*input, **kwargs) File "/home/Liutl/anaconda3/envs/sgcn/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 151, in forward replicas = self.replicate(self.module, self.device_ids[:len(inputs)]) File "/home/Liutl/anaconda3/envs/sgcn/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 156, in replicate return replicate(module, device_ids, not torch.is_grad_enabled()) File "/home/Liutl/anaconda3/envs/sgcn/lib/python3.7/site-packages/torch/nn/parallel/replicate.py", line 146, in replicate setattr(replica, key, Parameter(param)) File "/home/Liutl/anaconda3/envs/sgcn/lib/python3.7/site-packages/torch/nn/parameter.py", line 26, in new return torch.Tensor._make_subclass(cls, data, requires_grad) RuntimeError: Only Tensors of floating point dtype can require gradients

您知道如何解决么?

DannyFengFeng commented 3 years ago

是不是torch版本的问题?我换了个torch版本就不出现这个问题了。

BrownStorm commented 3 years ago

是不是torch版本的问题?我换了个torch版本就不出现这个问题了。

请问你用的是什么版本?

DannyFengFeng commented 3 years ago

是不是torch版本的问题?我换了个torch版本就不出现这个问题了。

请问你用的是什么版本?

1.3.1