Closed wcong7079 closed 4 years ago
Hello, did you solve this problem, I also encountered this problem, but my mmcv is 1.x version, it can be used after downgrading to 0.2.10.
I'm observing something similar with test_video.py
:
python test_video.py config_files/sthv2/tsm_tpn.py ckpt/sthv2_tpn.pth --video_file juggling_short.mp4 --rendered_output juggling_short_res.mp4
Error:
The model and loaded state dict do not match exactly
missing keys in source state_dict: necks.aux_head.convs.conv.weight, necks.aux_head.convs.bn.weight, necks.aux_head.convs.bn.bias, necks.aux_head.convs.bn.running_mean, necks.aux_head.convs.bn.running_var, necks.aux_head.fc.weight, necks.aux_head.fc.bias
您好,您解决了这个问题,我也遇到了这个问题,但是我的mmcv是1.x版本,降级到0.2.10后可以使用。
I'm observing something similar with
test_video.py
:python test_video.py config_files/sthv2/tsm_tpn.py ckpt/sthv2_tpn.pth --video_file juggling_short.mp4 --rendered_output juggling_short_res.mp4
Error:
The model and loaded state dict do not match exactly missing keys in source state_dict: necks.aux_head.convs.conv.weight, necks.aux_head.convs.bn.weight, necks.aux_head.convs.bn.bias, necks.aux_head.convs.bn.running_mean, necks.aux_head.convs.bn.running_var, necks.aux_head.fc.weight, necks.aux_head.fc.bias
Thank you very much, I solved this problem, but encountered a new problem: WARNING - unexpected key in source state_dict: fc.weight, fc.bias FileExistsError: [Errno 17] File exists: '/home/wang/project/python/TPN-master/chekpoint/sthv2_tpn.pth'
I'm observing something similar with
test_video.py
:python test_video.py config_files/sthv2/tsm_tpn.py ckpt/sthv2_tpn.pth --video_file juggling_short.mp4 --rendered_output juggling_short_res.mp4
Error:
The model and loaded state dict do not match exactly missing keys in source state_dict: necks.aux_head.convs.conv.weight, necks.aux_head.convs.bn.weight, necks.aux_head.convs.bn.bias, necks.aux_head.convs.bn.running_mean, necks.aux_head.convs.bn.running_var, necks.aux_head.fc.weight, necks.aux_head.fc.bias
Hello, I also encountered the same problem, did you solve it?
Aux head is not used during inference time. So you can ignore the error 'missing keys in source state_dict'.
Hello, I am executing:
python tools/train_recognizer.py config_files/sthv2/tsm_tpn.py --work_dir chekpoint/sthv2_tpn.pth
Warning:WARNING-The model and loaded state dict do not match exactly
Error:TypeError: optimizer must be a dict of torch.optim.Optimizers, but optimizer["type"] is a <class'str'>
Please give me some suggestions, Thank you!