Skip to content

Commit

Permalink
updates for v0.4.0 release preparation
Browse files Browse the repository at this point in the history
Signed-off-by: Ranganath Krishnan <[email protected]>
  • Loading branch information
ranganathkrishnan committed Jul 27, 2023
1 parent c3e9a0f commit 93cf0d3
Show file tree
Hide file tree
Showing 24 changed files with 37 additions and 28 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2021, Intel Labs
Copyright (c) 2023, Intel Labs
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A library for Bayesian neural network layers and uncertainty estimation in Deep

[![python](https://img.shields.io/badge/python-3.7%2B-blue)](https://github.com/IntelLabs/bayesian-torch)
[![pytorch](https://img.shields.io/badge/pytorch-1.7.0%2B-orange)](https://github.com/IntelLabs/bayesian-torch)
[![version](https://img.shields.io/badge/release-0.3.0-green)](https://github.com/IntelLabs/bayesian-torch/releases)
[![version](https://img.shields.io/badge/release-0.4.0-green)](https://github.com/IntelLabs/bayesian-torch/releases)
[![license](https://img.shields.io/badge/license-BSD%203--Clause-blue)](https://github.com/IntelLabs/bayesian-torch/blob/main/LICENSE)
[![Downloads](https://static.pepy.tech/badge/bayesian-torch)](https://pepy.tech/project/bayesian-torch)
<h4 align="center">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2021 Intel Labs
# Copyright (C) 2023 Intel Labs
#
# BSD-3-Clause License
#
Expand Down Expand Up @@ -1425,4 +1425,4 @@ def forward(self, input, enable_int8_compute=True, normal_scale=6/255, default_s
if return_kl:
return out, 0 # disable kl divergence computing

return out
return out
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2021 Intel Labs
# Copyright (C) 2023 Intel Labs
#
# BSD-3-Clause License
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2021 Intel Labs
# Copyright (C) 2023 Intel Labs
#
# BSD-3-Clause License
#
Expand Down Expand Up @@ -1300,4 +1300,4 @@ def forward(self, x, normal_scale=6/255, default_scale=0.1, default_zero_point=1
if return_kl:
return out, 0

return out
return out
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2021 Intel Labs
# Copyright (C) 2023 Intel Labs
#
# BSD-3-Clause License
#
Expand Down
2 changes: 1 addition & 1 deletion bayesian_torch/ao/quantization/quantize.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2021 Intel Labs
# Copyright (C) 2023 Intel Labs
#
# BSD-3-Clause License
#
Expand Down
2 changes: 1 addition & 1 deletion bayesian_torch/layers/base_variational_layer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2021 Intel Labs
# Copyright (C) 2023 Intel Labs
#
# BSD-3-Clause License
#
Expand Down
2 changes: 1 addition & 1 deletion bayesian_torch/layers/flipout_layers/conv_flipout.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2021 Intel Labs
# Copyright (C) 2023 Intel Labs
#
# BSD-3-Clause License
#
Expand Down
2 changes: 1 addition & 1 deletion bayesian_torch/layers/flipout_layers/linear_flipout.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2021 Intel Labs
# Copyright (C) 2023 Intel Labs
#
# BSD-3-Clause License
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2021 Intel Labs
# Copyright (C) 2023 Intel Labs
#
# BSD-3-Clause License
#
Expand Down Expand Up @@ -1348,4 +1348,4 @@ def forward(self, x, normal_scale=6/255, default_scale=0.1, default_zero_point=1
if return_kl:
return out, 0

return out
return out
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2021 Intel Labs
# Copyright (C) 2023 Intel Labs
#
# BSD-3-Clause License
#
Expand Down
2 changes: 1 addition & 1 deletion bayesian_torch/layers/flipout_layers/rnn_flipout.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2021 Intel Labs
# Copyright (C) 2023 Intel Labs
#
# BSD-3-Clause License
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2021 Intel Labs
# Copyright (C) 2023 Intel Labs
#
# BSD-3-Clause License
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2021 Intel Labs
# Copyright (C) 2023 Intel Labs
#
# BSD-3-Clause License
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2021 Intel Labs
# Copyright (C) 2023 Intel Labs
#
# BSD-3-Clause License
#
Expand Down Expand Up @@ -1489,4 +1489,4 @@ def forward(self, input, enable_int8_compute=True, normal_scale=6/255, default_s
if return_kl:
return out, 0 # disable kl divergence computing

return out
return out
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2021 Intel Labs
# Copyright (C) 2023 Intel Labs
#
# BSD-3-Clause License
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2021 Intel Labs
# Copyright (C) 2023 Intel Labs
#
# BSD-3-Clause License
#
Expand Down
4 changes: 2 additions & 2 deletions bayesian_torch/models/bnn_to_qbnn.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2021 Intel Labs
# Copyright (C) 2023 Intel Labs
#
# BSD-3-Clause License
#
Expand Down Expand Up @@ -256,4 +256,4 @@ def forward(self, x):
print(m)
if input.dtype!=torch.quint8:
input = torch.quantize_per_tensor(input, 0.1, 128, torch.quint8)
print(m(input))
print(m(input))
2 changes: 1 addition & 1 deletion bayesian_torch/models/dnn_to_bnn.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2021 Intel Labs
# Copyright (C) 2023 Intel Labs
#
# BSD-3-Clause License
#
Expand Down
9 changes: 9 additions & 0 deletions bayesian_torch/scripts/quantize_bayesian_cifar.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

model=resnet20
mode='ptq'
batch_size=1000
num_monte_carlo=20
checkpoint_file=./checkpoint/bayesian/bayesian_resnet20_cifar.pth

python examples/main_bayesian_cifar_dnn2bnn.py --arch=$model --mode=$mode --batch-size=$batch_size --num_monte_carlo=$num_monte_carlo --model-checkpoint=$checkpoint_file
2 changes: 1 addition & 1 deletion bayesian_torch/utils/avuc_loss.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2021 Intel Corporation
# Copyright (C) 2023 Intel Corporation
#
# BSD-3-Clause License
#
Expand Down
2 changes: 1 addition & 1 deletion bayesian_torch/utils/util.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2021 Intel Labs
# Copyright (C) 2023 Intel Labs
#
# BSD-3-Clause License
#
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
setup(
name = "bayesian-torch",
packages = find_packages(),
version = "0.3.0",
version = "0.4.0",
description = "A library for Bayesian neural network layers and uncertainty estimation in Deep Learning",
author = "Intel Labs",
author_email = "[email protected]",
Expand Down

0 comments on commit 93cf0d3

Please sign in to comment.