• Stars
    star
    435
  • Rank 96,212 (Top 2 %)
  • Language
    Python
  • License
    MIT License
  • Created over 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

PyTorch implementation of bayesian neural network.

Bayesian-Neural-Network-Pytorch

MIT License Pypi Documentation Status

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

More Repositories

1

adversarial-attacks-pytorch

PyTorch implementation of adversarial attacks [torchattacks].
Python
1,700
star
2

PGD-pytorch

A pytorch implementation of "Towards Deep Learning Models Resistant to Adversarial Attacks"
Jupyter Notebook
133
star
3

FGSM-pytorch

A pytorch implementation of "Explaining and harnessing adversarial examples"
Jupyter Notebook
62
star
4

CW-pytorch

A pytorch implementation of "Towards Evaluating the Robustness of Neural Networks"
Jupyter Notebook
48
star
5

Pytorch-Basic

Pytorch Codes for Beginner
Jupyter Notebook
34
star
6

adversarial-defenses-pytorch

PyTorch implementations of Adversarial defenses and utils.
Python
33
star
7

catastrophic-overfitting

Understanding Catastrophic Overfitting in Single-step Adversarial Training [AAAI 2021]
Jupyter Notebook
27
star
8

MIDA-pytorch

PyTorch implementation of "MIDA: Multiple Imputation using Denoising Autoencoders"
Jupyter Notebook
22
star
9

MAIR

PyTorch implementation of adversarial training and defenses [Fantastic Robustness Measures: The Secrets of Robust Generalization, NeurIPS 2023].
Python
18
star
10

IPNN-pytorch

A pytorch implementation of "Intriguing properties of neural networks"
Jupyter Notebook
17
star
11

AEPW-pytorch

A pytorch implementation of "Adversarial Examples in the Physical World"
Jupyter Notebook
15
star
12

pytorch-custom-utils

Custom utils for Pytorch
Python
9
star
13

RFGSM-pytorch

A pytorch implementation of "Ensemble Adversarial Training : Attacks and Defenses"
Jupyter Notebook
8
star
14

privacy-pytorch

4
star
15

foolbox

Python
1
star
16

harry24k.github.io

HTML
1
star