Phoenix1327 / tea-action-recognition

The Pytorch code of the TEA module (Temporal Excitation and Aggregation for Action Recognition)
191 stars 31 forks source link

TypeError: forward() missing 1 required positional argument: 'x' #3

Closed huangjinghuangjing closed 4 years ago

huangjinghuangjing commented 4 years ago

When I ran the code, this problem occurred!

Traceback (most recent call last): File "main.py", line 371, in main() File "main.py", line 185, in main if args.evaluate: File "main.py", line 251, in train output = model(input_var) File "/home/huangjing/miniconda3/envs/daily/lib/python3.8/site-packages/torch/nn/modules/module.py", line 722, in _call_impl result = self.forward(*input, kwargs) File "/home/huangjing/miniconda3/envs/daily/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 153, in forward return self.module(*inputs[0], *kwargs[0]) File "/home/huangjing/miniconda3/envs/daily/lib/python3.8/site-packages/torch/nn/modules/module.py", line 722, in _call_impl result = self.forward(input, kwargs) File "/home/external_3/HJ/tea-action-recognition/ops/models.py", line 268, in forward base_out = self.base_model(input.view((-1, sample_len) + input.size()[-2:])) File "/home/huangjing/miniconda3/envs/daily/lib/python3.8/site-packages/torch/nn/modules/module.py", line 722, in _call_impl result = self.forward(*input, **kwargs) TypeError: forward() missing 1 required positional argument: 'x'

Phoenix1327 commented 4 years ago

It seems that the data loader does not output any tensors. Thus the ##input_var## in line 251 is NoneType.