kumar-shridhar / PyTorch-BayesianCNN

Bayesian Convolutional Neural Network with Variational Inference based on Bayes by Backprop in PyTorch.
MIT License
1.42k stars 323 forks source link

forward and outputs of models #71

Open jimmykimmy68 opened 2 years ago

jimmykimmy68 commented 2 years ago

Hi, thanks for your great work!

I have two questions on the Bayesian CNN codes, which are as follows;

First, where is the forward method in the model class? e.g., in class BBBAlexNet, there only is init, but isn't 'forward' prediction method.

Second, in main_bayesian.py, how does the network (i.e., model) output both so-called "outputs" and "_kl" ?

pluvias commented 1 year ago

Hi. A little bit late, but still.

First, BBBAlexNet class is inherited from ModuleWrapper class that inherits from nn.Module and has a forward method. Second, this forward method returns 2 values.