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

prediction #7

Open
haifengwu205 opened this issue Feb 11, 2023 · 0 comments
Open

prediction #7

haifengwu205 opened this issue Feb 11, 2023 · 0 comments

Comments

@haifengwu205
Copy link

When I run the test, the mode loading shape does not match

Traceback (most recent call last):
File "trainer.py", line 228, in
main()
File "trainer.py", line 149, in main
model = DepthLitModel.load_from_checkpoint(CKPT_PATH, config=config)
File "/data/home/wuhaifeng/anaconda3/envs/p3depth/lib/python3.7/site-packages/pytorch_lightning/core/saving.py", line 157, in load_from_checkpoint
model = cls._load_model_state(checkpoint, strict=strict, **kwargs)
File "/data/home/wuhaifeng/anaconda3/envs/p3depth/lib/python3.7/site-packages/pytorch_lightning/core/saving.py", line 205, in _load_model_state
model.load_state_dict(checkpoint['state_dict'], strict=strict)
File "/data/home/wuhaifeng/anaconda3/envs/p3depth/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1672, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for DepthLitModel:
size mismatch for net.coords: copying a param with shape torch.Size([8, 480, 640, 2]) from checkpoint, the shape in current model is torch.Size([16, 480, 640, 2]).

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

1 participant