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

KeyError: 'model' #1

Open
chenscottus opened this issue Oct 24, 2023 · 1 comment
Open

KeyError: 'model' #1

chenscottus opened this issue Oct 24, 2023 · 1 comment

Comments

@chenscottus
Copy link

Hello,

When I run either of these two commands, I get the same error:
  1) python3 test_video_ava.py --cuda -d ucf24 -v yowof-r50 --weight resnet-50-kinetics.pth --video 2022101301.mp4
  2) python3 demo.py --cuda -d ava_v2.2 -v yowof-r50 --weight resnet-50-kinetics.pth --video 2022101301.mp4

use cuda

Dataset Config: AVA_V2.2

Model Config: YOWOF-R50

Build YOWOF-R50 ...
D:\Tools\Python\Python311\Lib\site-packages\torch\functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ..\aten\src\ATen\native\TensorShape.cpp:3527.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]

2D Backbone: RESNET50
--pretrained: False

Head: Decoupled Head
Traceback (most recent call last):
File "D:\Workspace2023\Project2023\20231004\YOWOF\demo.py", line 252, in
model = load_weight(model=model, path_to_ckpt=args.weight)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Workspace2023\Project2023\20231004\YOWOF\utils\misc.py", line 188, in load_weight
checkpoint_state_dict = checkpoint.pop("model")
^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'model'

@Harry-KIT
Copy link

Hi @chenscottus, it is about torch version. please install as follows:
pip install torch==1.12.0+cu113 torchvision==0.13.0+cu113 --extra-index-url https://download.pytorch.org/whl/cu113

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