question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error running demo

See original GitHub issue

Hello, thanks for your nice paper. When I try to run the demo, I get:

>>> python demo.py

filenames ['./demo_images/000100.jpg', './demo_images/000101.jpg', './demo_images/000102.jpg', './demo_images/000103.jpg', './demo_images/000104.jpg', './demo_images/000105.jpg', './demo_images/000106.jpg', './demo_images/000107.jpg', './demo_images/000108.jpg', './demo_images/000109.jpg', './demo_images/000110.jpg', './demo_images/000111.jpg', './demo_images/000112.jpg', './demo_images/000113.jpg', './demo_images/000114.jpg', './demo_images/000115.jpg', './demo_images/000116.jpg', './demo_images/000117.jpg', './demo_images/000118.jpg', './demo_images/000119.jpg', './demo_images/000120.jpg', './demo_images/000121.jpg', './demo_images/000122.jpg', './demo_images/000123.jpg', './demo_images/000124.jpg', './demo_images/000125.jpg', './demo_images/000126.jpg', './demo_images/000127.jpg', './demo_images/000128.jpg', './demo_images/000129.jpg', './demo_images/000130.jpg', './demo_images/000131.jpg', './demo_images/000132.jpg', './demo_images/000133.jpg', './demo_images/000134.jpg', './demo_images/000135.jpg', './demo_images/000136.jpg', './demo_images/000137.jpg', './demo_images/000138.jpg', './demo_images/000139.jpg', './demo_images/000140.jpg', './demo_images/000141.jpg', './demo_images/000142.jpg', './demo_images/000143.jpg', './demo_images/000144.jpg', './demo_images/000145.jpg', './demo_images/000146.jpg', './demo_images/000147.jpg', './demo_images/000148.jpg', './demo_images/000149.jpg', './demo_images/000150.jpg', './demo_images/000151.jpg', './demo_images/000152.jpg', './demo_images/000153.jpg', './demo_images/000154.jpg', './demo_images/000155.jpg', './demo_images/000156.jpg', './demo_images/000157.jpg', './demo_images/000158.jpg', './demo_images/000159.jpg', './demo_images/000160.jpg', './demo_images/000161.jpg', './demo_images/000162.jpg', './demo_images/000163.jpg', './demo_images/000164.jpg', './demo_images/000165.jpg', './demo_images/000166.jpg', './demo_images/000167.jpg', './demo_images/000168.jpg', './demo_images/000169.jpg', './demo_images/000170.jpg', './demo_images/000171.jpg', './demo_images/000172.jpg', './demo_images/000173.jpg', './demo_images/000174.jpg', './demo_images/000175.jpg', './demo_images/000176.jpg', './demo_images/000177.jpg', './demo_images/000178.jpg', './demo_images/000179.jpg', './demo_images/000180.jpg', './demo_images/000181.jpg', './demo_images/000182.jpg', './demo_images/000183.jpg', './demo_images/000184.jpg', './demo_images/000185.jpg', './demo_images/000186.jpg', './demo_images/000187.jpg', './demo_images/000188.jpg', './demo_images/000189.jpg', './demo_images/000190.jpg', './demo_images/000191.jpg', './demo_images/000192.jpg', './demo_images/000193.jpg', './demo_images/000194.jpg', './demo_images/000195.jpg', './demo_images/000196.jpg', './demo_images/000197.jpg', './demo_images/000198.jpg', './demo_images/000199.jpg']
model_name 01_8_256_00_08:34:33
reading ckpt from reference_model
...found checkpoint reference_model/model-000100000.pth
Traceback (most recent call last):
  File "/my/home/pips/demo.py", line 166, in <module>
    main()
  File "/my/home/pips/demo.py", line 121, in main
    _ = saverloader.load(init_dir, model)
  File "/my/home/pips/saverloader.py", line 59, in load
    model.load_state_dict(checkpoint['model_state_dict'], strict=False)
  File "/my/home/opt/miniconda3/envs/new/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1497, in load_state_dict
    raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for Pips:
	size mismatch for delta_block.to_delta.0.weight: copying a param with shape torch.Size([512, 715]) from checkpoint, the shape in current model is torch.Size([512, 1038]).

I have only run sh get_reference_model.sh and I have not changed any files.

Thanks for your help!

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
codylcscommented, Dec 16, 2022

Hi @codylcs, sorry, I am updating the repo a bit tonight, and I added a new model ckpt. Can you pull again? I think your issue will disappear.

yeah ,thanks

0reactions
codylcscommented, Dec 16, 2022

715

i print k and relative shape, …found checkpoint reference_model\model-000200000.pth delta_block.to_delta.0.weight torch.Size([512, 519]) model k: torch.Size([512, 715]) as u see,mode net shapes are not same as parameters shape

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error running demo.R · Issue #192 - GitHub
Hi! You first must install the package, then load it with `library(Robyn)`, and then you won't have this problem.
Read more >
Syntax error shows running the Demo - Google Groups
But i got into some trouble when complie that code, then i try to run the Demo in Chrono to find the problem....
Read more >
Error running Demo code - FEniCS Project
I installed Fenics on Windows Subsystem for Linux (Ubuntu 18.04), using sudo apt-get install software-properties-common sudo ...
Read more >
Error in running demo - Intel Communities
This error occurs when upgrading a package, pip fails to uninstall the old version before installing the new version. To solve this issue,...
Read more >
Error running VisionWorks video_stabilizer demo
Hi @vcb1 , I'm trying to get the video_stabilizer demo working on Ubuntu 18 host machine, with VisionWorks 1.6 and cuda 10.2. Compilation...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found