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

CPU/GPU Spec you've used for running main_bayesian.py #61

Closed YeonghyeonKO closed 3 years ago

YeonghyeonKO commented 3 years ago

Hi, I'm studying Bayesian CNN theseday,

and I've tried to run main_bayesian.py with MacBook Pro ('16 2019 16GB Ram)

n_epochs and batch_size (the hyper-parameter you've set) are 200 and 256 each,

but I'm afraid my MacBook cannot withstand the load for training BCNN.

So, I changed the number of epochs and batches to 10 and 100, respectively.

image

As the above photo, Validation Accuracy exceeds 0.97 (I think it's not bad)

I'm curious about your H/W Spec when designing and testing this model you've uploaded.

kumar-shridhar commented 3 years ago

Hi, I did not benchmark the Hardware specs but you can run this on Google Colab with free GPUs there. In general my assumption will be Bayesian CNN will take twice the computation needed for non-Bayesian methods. This is primarily due the computation of both means and variances.

YeonghyeonKO commented 3 years ago

Thank you for answering me :)