Open pgarimidi opened 2 years ago
Hi guys, thanks for opening the issue, sorry for being a bit slow with getting back to you on this.
The best starting point for a tutorial would probably be one closely following the regression notebook in the notebooks
directory to introduce all the basic objects that a user interacts with (network, prior, likelihood and guide) for defining a BNN as well as the fit and predict functions. Variance reduction with local reparameterization as well as HMC-based inference could be advanced points to finish on or a part 2. I don't think you'd need to introduce much mathematically, linking to the pyro tutorials or some (review) papers should be enough for now in my view, but perhaps @karalets has something to add on this.
I you'd like to set up something from scratch, an MNIST-based tutorial with a LeNet could be nice as well for a more standard deep learning use case to highlight that the data loading etc is all based on pytorch. You could compare the predictive distribution of the BNN with a deterministic net on out-of-distribution data (e.g. NotMNIST letters, FashionMNIST) or perturbations (e.g. rotated MNIST images) where the uncertainty will increase with the BNN.
I'll open issues for these two, but for more advanced tutorials you can follow the structure of the paper and base them on the different sections. Or if you have any other use cases in mind that you're excited about, feel free to suggest them or just draft something.
Practically, there already is a root file for the tutorials in docs/source/tutorials.rst
. You can just follow the naming patterns and add tutorials.regression.rst
etc and build the docs locally by running make html
from the docs directory as you edit them. Let me know if you have any problems, it might be necessary to modify the index.rst
file or link individual tutorials in the tutorials.rst
.
Sounds good! We'll get to work on it. Also, just a heads up. I changed my username from nb2838 to velezbeltran just in case you want to tag me in something in the future.
Please let us know what tutorials you think would be best for us to write. Our handles are @pgarimidi, @nb2838