Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test.py #1

Open
yangjinghit opened this issue Aug 13, 2020 · 2 comments
Open

test.py #1

yangjinghit opened this issue Aug 13, 2020 · 2 comments

Comments

@yangjinghit
Copy link

@mbiparva
how to use test.py? after I trained, I tried python test.py -i 20200812_135411_361917 -p 039, but failed
└── 20200812_135411_361917
├── 004.pth
├── 009.pth
├── 014.pth
├── 019.pth
├── 024.pth
├── 029.pth
├── 034.pth
└── 039.pth

@yangjinghit
Copy link
Author

*** started @ 2020-08-13 14:44:19.251603
Traceback (most recent call last):
File "test.py", line 87, in
main()
File "test.py", line 58, in main
epoch_loop.main()
File "/home/ripple/anaconda3/work/slowfast-networks-pytorch/tools/epoch_loop.py", line 66, in main
self.setup_net()
File "/home/ripple/anaconda3/work/slowfast-networks-pytorch/tools/epoch_loop.py", line 74, in setup_net
self.net = TwoStreamNet(self.device)
File "/home/ripple/anaconda3/work/slowfast-networks-pytorch/lib/netwrapper/two_stream_net.py", line 36, in init
self.create_load(device)
File "/home/ripple/anaconda3/work/slowfast-networks-pytorch/lib/netwrapper/two_stream_net.py", line 50, in create_load
self.load(cfg.PT_PATH)
File "/home/ripple/anaconda3/work/slowfast-networks-pytorch/lib/netwrapper/two_stream_net.py", line 113, in load
self.load_state_dict(torch.load(file_path))
File "/home/ripple/anaconda3/envs/py37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 830, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for TwoStreamNet:
Unexpected key(s) in state_dict: "fc.weight".

@zenoZhao
Copy link

zenoZhao commented Aug 6, 2021

i got exactly the same error as @yangjinghit, could you please give some ideas how to fix it? @mbiparva

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants