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

size mismatch #95

Open
fengjingchehu opened this issue Mar 19, 2024 · 2 comments
Open

size mismatch #95

fengjingchehu opened this issue Mar 19, 2024 · 2 comments

Comments

@fengjingchehu
Copy link

(alph) user@user-Super-Server:/mnt/745425dc-5d5b-4490-9d38-57169dcb2ab3/wxl/AlphAction-master$ python demo/demo.py --video-path "demo/input/test4.avi" --output-path "demo/123" --cfg-path "./config_files/resnet101_8x8f_denseserial.yaml" --weight-path "./data/models/aia_models/resnet101_8x8f_denseserial.pth" --common-cate
Starting video demo, video path: demo/input/test4.avi
/home/user/anaconda3/envs/alph/lib/python3.8/site-packages/torch/nn/modules/container.py:552: UserWarning: Setting attributes on ParameterDict is not supported.
warnings.warn("Setting attributes on ParameterDict is not supported.")
/home/user/anaconda3/envs/alph/lib/python3.8/site-packages/torch/cuda/init.py:104: UserWarning:
NVIDIA GeForce RTX 4090 with CUDA capability sm_89 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_70 sm_75.
If you want to use the NVIDIA GeForce RTX 4090 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/

warnings.warn(incompatible_device_warn.format(device_name, capability, " ".join(arch_list), device_name))
Loading action model weight from ./data/models/aia_models/resnet101_8x8f_denseserial.pth.
Traceback (most recent call last):
File "demo/demo.py", line 194, in
main()
File "demo/demo.py", line 143, in main
ava_predictor_worker = AVAPredictorWorker(args)
File "/mnt/745425dc-5d5b-4490-9d38-57169dcb2ab3/wxl/AlphAction-master/demo/action_predictor.py", line 245, in init
self.ava_predictor = AVAPredictor(
File "/mnt/745425dc-5d5b-4490-9d38-57169dcb2ab3/wxl/AlphAction-master/demo/action_predictor.py", line 70, in init
_ = checkpointer.load(cfg.MODEL.WEIGHT)
File "/home/user/anaconda3/envs/alph/lib/python3.8/site-packages/alphaction-0.0.0-py3.8-linux-x86_64.egg/alphaction/utils/checkpoint.py", line 61, in load
self._load_model(checkpoint, no_head)
File "/home/user/anaconda3/envs/alph/lib/python3.8/site-packages/alphaction-0.0.0-py3.8-linux-x86_64.egg/alphaction/utils/checkpoint.py", line 110, in _load_model
load_state_dict(self.model, checkpoint.pop("model"), no_head)
File "/home/user/anaconda3/envs/alph/lib/python3.8/site-packages/alphaction-0.0.0-py3.8-linux-x86_64.egg/alphaction/utils/model_serialization.py", line 83, in load_state_dict
model.load_state_dict(model_state_dict)
File "/home/user/anaconda3/envs/alph/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for ActionDetector:
size mismatch for roi_heads.action.predictor.cls_score.weight: copying a param with shape torch.Size([80, 1024]) from checkpoint, the shape in current model is torch.Size([15, 1024]).
size mismatch for roi_heads.action.predictor.cls_score.bias: copying a param with shape torch.Size([80]) from checkpoint, the shape in current model is torch.Size([15]).

i wonder which size can i use and how ?

@tan2003IT
Copy link

同问,但不知道作者什么时候回复

@fengjingchehu
Copy link
Author

同问,但不知道作者什么时候回复

好久了

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