← 开源

PyTorch implementation of bayesian neural network [torchbnn]

Model DevelopmentDeep Learning FrameworksPython
增长势头
+024 小时新增 Star0.0%
563
Star
88
Fork
+-1
本周
1
贡献者
创建于 2019-09-04 · 更新于 2026-11-30 · 今日第 21817 名
主要开发者
README

Bayesian-Neural-Network-Pytorch

This is a lightweight repository of bayesian neural network for PyTorch.

Usage

📋 Dependencies

  • torch 1.2.0
  • python 3.6

🔨 Installation

  • pip install torchbnn or
  • git clone https://github.com/Harry24k/bayesian-neural-network-pytorch
import torchbnn

🚀 Demos

  • Bayesian Neural Network Regression (code): In this demo, two-layer bayesian neural network is constructed and trained on simple custom data. It shows how bayesian-neural-network works and randomness of the model.
  • Bayesian Neural Network Classification (code): To classify Iris data, in this demo, two-layer bayesian neural network is constructed and trained on the Iris data. It shows how bayesian-neural-network works and randomness of the model.
  • Convert to Bayesian Neural Network (code): To convert a basic neural network to a bayesian neural network, this demo shows how nonbayes_to_bayes and bayes_to_nonbayes work.
  • Freeze Bayesian Neural Network (code): To freeze a bayesian neural network, which means force a bayesian neural network to output same result for same input, this demo shows the effect of freeze and unfreeze.

Citation

If you use this package, please cite the following BibTex (SemanticScholar, GoogleScholar):

@article{lee2022graddiv,
  title={Graddiv: Adversarial robustness of randomized neural networks via gradient diversity regularization},
  author={Lee, Sungyoon and Kim, Hoki and Lee, Jaewook},
  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
  year={2022},
  publisher={IEEE}
}

🔎 Update Records

Here is update records of this package.

Thanks to

排名相邻
同类项目

AI Rank iPhone 版

随时追踪 AI 模型榜单

在 App Store 下载