You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/home/lmz/anaconda3/envs/py36/bin/python /home/lmz/TPN/test_video.py config_files/sthv2/tsm_tpn.py ckpt/sthv2_tpn.pth
Extracting frames using ffmpeg...
The model and loaded state dict do not match exactly
Traceback (most recent call last):
File "/home/lmz/TPN/test_video.py", line 148, in
results = inference_recognizer(model, seg_frames)
File "/home/lmz/TPN/test_video.py", line 75, in inference_recognizer
result = model(return_loss=False, rescale=True, **data)
File "/home/lmz/anaconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/lmz/TPN/mmaction/models/recognizers/base.py", line 41, in forward
return self.forward_test(num_modalities, img_meta, **kwargs)
File "/home/lmz/TPN/mmaction/models/recognizers/TSN2D.py", line 154, in forward_test
x = self.segmental_consensus(x)
File "/home/lmz/anaconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/lmz/TPN/mmaction/models/tenons/segmental_consensuses/simple_consensus.py", line 50, in forward
return _SimpleConsensus(self.consensus_type, self.dim)(input)
File "/home/lmz/anaconda3/envs/py36/lib/python3.6/site-packages/torch/autograd/function.py", line 160, in call
"Legacy autograd function with non-static forward method is deprecated. "
RuntimeError: Legacy autograd function with non-static forward method is deprecated. Please use new-style autograd function with static forward method. (Example: https://pytorch.org/docs/stable/autograd.html#torch.autograd.Function)
/home/lmz/anaconda3/envs/py36/bin/python /home/lmz/TPN/test_video.py config_files/sthv2/tsm_tpn.py ckpt/sthv2_tpn.pth
Extracting frames using ffmpeg...
The model and loaded state dict do not match exactly
Traceback (most recent call last):
File "/home/lmz/TPN/test_video.py", line 148, in
results = inference_recognizer(model, seg_frames)
File "/home/lmz/TPN/test_video.py", line 75, in inference_recognizer
result = model(return_loss=False, rescale=True, **data)
File "/home/lmz/anaconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/lmz/TPN/mmaction/models/recognizers/base.py", line 41, in forward
return self.forward_test(num_modalities, img_meta, **kwargs)
File "/home/lmz/TPN/mmaction/models/recognizers/TSN2D.py", line 154, in forward_test
x = self.segmental_consensus(x)
File "/home/lmz/anaconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
TypeError: forward() missing 1 required positional argument: 'input'
Process finished with exit code 1
The text was updated successfully, but these errors were encountered:
运行环境:
背景&现象:
由于Pytorch 1.3以下版本,不支持CUDA11,无法兼容30系GPU,所以使用了Pytorch1.7,运行demo时,输出如下错误:
了解到在pytorch1.3及以后的版本需要规定forward方法为静态方法,给TPN/mmaction/models/tenons/segmental_consensuses/simple_consensus.py 中的forward方法加上静态修饰,报错:
The text was updated successfully, but these errors were encountered: