The updated code seems faulty
See original GitHub issueThe 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:
- Created 4 years ago
- Comments:6 (1 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Same problem here anybody know how to solve this issue?