Practical overview
When it fits
Use it when you need reference implementations and runnable experimental examples for comparing approximate inference methods in neural networks, particularly on regression and MNIST tasks.
Who it is for
- Researchers comparing approximate inference methods on regression or MNIST tasks.
- Practitioners prototyping Bayesian neural-network classifiers or uncertainty experiments.
- PyTorch users studying predictive uncertainty, model weights and training workflows.
Documented uses
- Train Bayesian neural-network models on MNIST using the included method-specific scripts.
- Explore homoscedastic and heteroscedastic regression examples with toy or UCI datasets.
- Compare inference methods and examine uncertainty under rotated-digit inputs.
- Inspect, plot or prune model weights using the classification notebooks.
Requirements & limits
The public repository displays an MIT license badge. The README lists PyTorch, NumPy and Matplotlib as prerequisites and documents Python 2.7 with PyTorch 1.0.1.
- The documented environment is an older Python and PyTorch stack; assess whether it fits your intended development environment.
- CPU execution is documented, with CUDA used automatically when available; Colab notebooks provide a separate GPU workflow.
- Method-specific scripts expose different training options, and training metrics and weights are saved to specified directories.
- The README describes fixed-learning-rate SGLD practice while noting annealing conditions for convergence to the true posterior.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Train a Bayes by Backprop model on MNIST
Run the repository’s documented MNIST training script for Bayes by Backprop.
Before you start
- Python 2.7
- PyTorch 1.0.1
- NumPy
- Matplotlib
Steps
Use the repository’s MNIST training script,
train_BayesByBackprop_MNIST.py.Run the command below to view the script’s arguments.
python train_BayesByBackprop_MNIST.py -hRun the command below with any desired documented options:
--model,--prior_sig,--epochs,--lr,--n_samples,--models_dir, or--results_dir.python train_BayesByBackprop_MNIST.pyReview the specified output directories for training metrics and model weights.
Expected outcome
The script trains a Bayes by Backprop model on MNIST and saves training metrics and model weights to specified directories.
Guide limitations
- The README says best results are obtained with a Laplace prior.
- If CUDA is available, it is used automatically; the models can also run on CPU.
Train an MC Dropout model on MNIST
Run the repository’s documented MNIST training script for MC Dropout.
Before you start
- Python 2.7
- PyTorch 1.0.1
- NumPy
- Matplotlib
Steps
Use the repository’s MNIST training script,
train_MCDropout_MNIST.py.Run the command below to view the script’s arguments.
python train_MCDropout_MNIST.py -hRun the command below with any desired documented options:
--weight_decay,--epochs,--lr,--models_dir, or--results_dir.python train_MCDropout_MNIST.pyReview the specified output directories for training metrics and model weights.
Expected outcome
The script trains an MC Dropout model on MNIST and saves training metrics and model weights to specified directories.
Guide limitations
- The README specifies a fixed dropout rate of 0.5.
- If CUDA is available, it is used automatically; the models can also run on CPU.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 16 October 2026
- Original website title
- JavierAntoran/Bayesian-Neural-Networks · Official homepage title · retained in its source language

