pytorch-video-recognition icon indicating copy to clipboard operation
pytorch-video-recognition copied to clipboard

KeyError: 'state_dict'

Open marsna opened this issue 5 years ago • 3 comments
trafficstars

I run inference.py with pretrained model: Traceback (most recent call last): File "inference.py", line 78, in main() File "inference.py", line 32, in main model.load_state_dict(checkpoint['state_dict']) KeyError: 'state_dict'

marsna avatar May 15 '20 04:05 marsna

@jfzhang95 I run inference.py with pretrained model: Traceback (most recent call last): File "inference.py", line 78, in main() File "inference.py", line 32, in main model.load_state_dict(checkpoint['state_dict']) KeyError: 'state_dict' Help me,please!

marsna avatar May 15 '20 07:05 marsna

@sdxass I run inference.py with pretrained model: Traceback (most recent call last): File "inference.py", line 78, in main() File "inference.py", line 32, in main model.load_state_dict(checkpoint['state_dict']) KeyError: 'state_dict' Help me,please!

marsna avatar May 15 '20 07:05 marsna

@jfzhang95 I run inference.py with pretrained model: Traceback (most recent call last): File "inference.py", line 78, in main() File "inference.py", line 32, in main model.load_state_dict(checkpoint['state_dict']) KeyError: 'state_dict' Help me,please!

The weight file shared by @jfzhang95 is trained on Sports-1M dataset,(It have 487 classes)its not on UCF-101,if you want to test inference code. give the sports 1m dataset labels file instead of ucf-101 labels file. https://github.com/gtoderici/sports-1m-dataset/blob/master/labels.txt

Sandeep418 avatar May 27 '20 05:05 Sandeep418