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.

The updated code seems faulty

See original GitHub issue

The changes introduced by f41aa32 (updated KL) result in a size mismatch error, e.g. in the Bayesian_CNN_Detailed notebook.

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<timed exec> in <module>()

PyTorch-BayesianCNN/Image Recognition/utils/BayesianModels/BayesianAlexNet.py in probforward(self, x)
     42             if hasattr(layer, 'convprobforward') and callable(layer.convprobforward):
     43                 x, _kl, = layer.convprobforward(x)
---> 44                 kl += _kl
     45 
     46             elif hasattr(layer, 'fcprobforward') and callable(layer.fcprobforward):

RuntimeError: The size of tensor a (11) must match the size of tensor b (5) at non-singleton dimension 3

Simply summing the _kl variable resolves this error. But I am unable to train a model on MNIST, while I was able to get a working MNIST classifier using the previous version of the code (not on CIFAR, though, see #8).

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
lemonahmascommented, Jun 17, 2019

image The accuracy is still very low as you can see from the image above, this result comes from the latest code.

2reactions
aadityachapagaincommented, Jun 6, 2019

Same problem here anybody know how to solve this issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Windows 10 /Windows Update failure error code 0x80040155
Original title: Windows 10 /Windows Update failure Dear Microsoft Community, I was having trouble with my custom built PC since the start.
Read more >
Coding problems? Learn what to do when you're stuck
Even the best programmers get stuck sometimes. Here are some tips to help you get unstuck and learn from your mistakes.
Read more >
Code is not updated after git pull, git integration is unreliable
Only after I quit Visual Studio completely and opened it again, the changed Code appears. Very frustrating. System Info: Visual Studio Community 2019...
Read more >
Fix Chrome update problems & failed updates - Google Support
If you're having problems updating Chrome on your computer, you might see: Update failed: Updates are disabled by administrator.
Read more >
A.7 Fix your code on GitHub - Hands-On Data Visualization
To check if your code template has an issue with one of its online code dependencies, go back to the original GitHub repository...
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