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.

inference example

See original GitHub issue

Running the inference gives this output. Can we give a set of images as input and then it gives which cluster it belongs to. python scripts/DeepDPM_load_from_checkpoint.py Sequential() [tensor([3, 2, 2, 0, 2, 1, 1, 1, 3, 2, 0, 0, 3, 0, 1, 2, 3, 5, 0, 3, 3, 2, 1, 2, 5, 3, 2, 2, 5, 2, 1, 3, 2, 2, 4, 0, 3, 2, 4, 2, 1, 0, 0, 3, 3, 4, 1, 1, 2, 5, 2, 2, 0, 0, 4, 0, 3, 2, 5, 0, 0, 2, 1, 2, 4, 3, 2, 0, 0, 3, 5, 2, 2, 1, 5, 2, 2, 2, 3, 2, 2, 0, 0, 3, 0, 1, 0, 0, 4, 2, 3, 1, 2, 3, 2, 1, 2, 3, 0, 2, 0, 2, 0, 5, 0, 2, 1, 5, 2, 3, 2, 5, 0, 2, 4, 0, 1, 3, 0, 1, 3, 1, 0, 2, 5, 2, 0, 2]),

What should be output of inference

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
hafsaEncommented, Nov 24, 2022

Thank you @imranmu , I tried the same to do inference on mnist, but I get the following error:

Traceback (most recent call last): File "/home/hafsa/DeepDPM/DeepDPM_load_from_checkpoint.py", line 30, in <module> model = ClusterNetModel.load_from_checkpoint( File "/home/hafsa/.conda/envs/deepdpm/lib/python3.10/site-packages/pytorch_lightning/core/saving.py", line 157, in load_from_checkpoint model = cls._load_model_state(checkpoint, strict=strict, **kwargs) File "/home/hafsa/.conda/envs/deepdpm/lib/python3.10/site-packages/pytorch_lightning/core/saving.py", line 205, in _load_model_state model.load_state_dict(checkpoint['state_dict'], strict=strict) File "/home/hafsa/.conda/envs/deepdpm/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 ClusterNetModel: size mismatch for cluster_net.class_fc1.weight: copying a param with shape torch.Size([50, 10]) from checkpoint, the shape in current model is torch.Size([50, 784]). size mismatch for subclustering_net.class_fc1.weight: copying a param with shape torch.Size([50, 10]) from checkpoint, the shape in current model is torch.Size([50, 784]). have you came across the same error? or can you please share the content of the file scripts/DeepDPM_load_from_checkpoint.py?

0reactions
imranmucommented, Nov 23, 2022

@hafsaEn python scripts/DeepDPM_load_from_checkpoint.py

Read more comments on GitHub >

github_iconTop Results From Across the Web

Examples of Inference | YourDictionary
Inference examples can be found in everyday life, or maybe in reading comprehension. Wherever you're looking, learn what makes an inference stand out....
Read more >
Inference Examples
Your friend walks past you without smiling. Her head is hanging down. She wipes a tear away from her eye, and looks at...
Read more >
Inference: Definition and Examples | LiteraryTerms.net
An inference is the process of drawing a conclusion from supporting evidence. It's when you go beyond the evidence and reach some further...
Read more >
Inference Rules & Examples | What is an Inference?
Inference is using observation and background to reach a logical conclusion. You probably practice inference every day. For example, if you see ...
Read more >
Inference: Meaning, Examples & Steps - StudySmarter
An example of inference is looking at a source's examples or tone to figure out why the subject is important and what the...
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