# kumar-shridhar/PyTorch-BayesianCNN

Bayesian Convolutional Neural Network with Variational Inference based on Bayes by Backprop in PyTorch.

Repository: https://github.com/kumar-shridhar/PyTorch-BayesianCNN
Canonical: https://ross.abutalabs.com/products/pytorch-bayesiancnn
Language: Python
License: MIT
License Family: permissive
Topics: convolutional-neural-networks, bayesian-network, bayesian-convnets, bayes-by-backprop, pytorch, python, pytorch-cnn, bayesian-neural-networks, bayesian-deep-learning, bayesian-inference, bayesian-statistics, image-recognition, aleatoric-uncertainties, bayes, bayesian-networks, variational-inference, variational-bayes
Last push: 2024-04-19T14:39:29+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 2959, "days_push": 866, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1570, forks 335 (observed 2026-08-28T04:05:05.374414+00:00)

## What it is
A PyTorch library implementing Bayesian convolutional neural networks with variational inference via Bayes by Backprop. It provides drop-in Bayesian replacements (BBBConv2d, BBBLinear) for standard PyTorch layers, with optional local reparametrization trick.

## Use cases
- estimate uncertainty in image classification predictions
- build a Bayesian CNN in PyTorch
- compare Bayesian vs frequentist CNN performance on MNIST or CIFAR
- apply Bayes by Backprop to convolutional layers
- quantify aleatoric uncertainty in deep learning models
- reproduce research on variational inference in CNNs

## When to choose
- you need uncertainty estimates from a CNN in PyTorch
- you want drop-in Bayesian layers for an existing PyTorch model
- you are doing research or coursework on Bayesian deep learning

## When to avoid
- you need production-grade, actively maintained deep learning tooling
- you need Bayesian layers beyond conv2d and linear
- you want the latest PyTorch features or GPU-optimized Bayesian inference

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, deep-learning
- domain: deep-learning, computer-vision, machine-learning
- platform: python
- tags: bayesian-deep-learning, bayes-by-backprop, variational-inference, uncertainty-estimation, pytorch, convolutional-neural-networks, research-code

## Member repositories
- kumar-shridhar/PyTorch-BayesianCNN (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:05.374414+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:58:34.362147+00:00, confidence not recorded.
  - readme: https://github.com/kumar-shridhar/PyTorch-BayesianCNN (fetched 2026-08-28T04:05:05.374414+00:00, sha 83cdfa78b986)
- Data as of 2026-08-30T08:39:29.467469+00:00.
