Skip to content

Commit 93cf0d3

Browse files
updates for v0.4.0 release preparation
Signed-off-by: Ranganath Krishnan <[email protected]>
1 parent c3e9a0f commit 93cf0d3

24 files changed

+37
-28
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2021, Intel Labs
3+
Copyright (c) 2023, Intel Labs
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ A library for Bayesian neural network layers and uncertainty estimation in Deep
77

88
[![python](https://img.shields.io/badge/python-3.7%2B-blue)](https://github.com/IntelLabs/bayesian-torch)
99
[![pytorch](https://img.shields.io/badge/pytorch-1.7.0%2B-orange)](https://github.com/IntelLabs/bayesian-torch)
10-
[![version](https://img.shields.io/badge/release-0.3.0-green)](https://github.com/IntelLabs/bayesian-torch/releases)
10+
[![version](https://img.shields.io/badge/release-0.4.0-green)](https://github.com/IntelLabs/bayesian-torch/releases)
1111
[![license](https://img.shields.io/badge/license-BSD%203--Clause-blue)](https://github.com/IntelLabs/bayesian-torch/blob/main/LICENSE)
1212
[![Downloads](https://static.pepy.tech/badge/bayesian-torch)](https://pepy.tech/project/bayesian-torch)
1313
<h4 align="center">

bayesian_torch/ao/nn/quantized/modules/quantize_conv_variational.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2021 Intel Labs
1+
# Copyright (C) 2023 Intel Labs
22
#
33
# BSD-3-Clause License
44
#
@@ -1425,4 +1425,4 @@ def forward(self, input, enable_int8_compute=True, normal_scale=6/255, default_s
14251425
if return_kl:
14261426
return out, 0 # disable kl divergence computing
14271427

1428-
return out
1428+
return out

bayesian_torch/ao/nn/quantized/modules/quantize_linear_variational.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2021 Intel Labs
1+
# Copyright (C) 2023 Intel Labs
22
#
33
# BSD-3-Clause License
44
#

bayesian_torch/ao/nn/quantized/modules/quantized_conv_flipout.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2021 Intel Labs
1+
# Copyright (C) 2023 Intel Labs
22
#
33
# BSD-3-Clause License
44
#
@@ -1300,4 +1300,4 @@ def forward(self, x, normal_scale=6/255, default_scale=0.1, default_zero_point=1
13001300
if return_kl:
13011301
return out, 0
13021302

1303-
return out
1303+
return out

bayesian_torch/ao/nn/quantized/modules/quantized_linear_flipout.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2021 Intel Labs
1+
# Copyright (C) 2023 Intel Labs
22
#
33
# BSD-3-Clause License
44
#

bayesian_torch/ao/quantization/quantize.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2021 Intel Labs
1+
# Copyright (C) 2023 Intel Labs
22
#
33
# BSD-3-Clause License
44
#

bayesian_torch/layers/base_variational_layer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2021 Intel Labs
1+
# Copyright (C) 2023 Intel Labs
22
#
33
# BSD-3-Clause License
44
#

bayesian_torch/layers/flipout_layers/conv_flipout.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2021 Intel Labs
1+
# Copyright (C) 2023 Intel Labs
22
#
33
# BSD-3-Clause License
44
#

bayesian_torch/layers/flipout_layers/linear_flipout.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2021 Intel Labs
1+
# Copyright (C) 2023 Intel Labs
22
#
33
# BSD-3-Clause License
44
#

bayesian_torch/layers/flipout_layers/quantized_conv_flipout.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2021 Intel Labs
1+
# Copyright (C) 2023 Intel Labs
22
#
33
# BSD-3-Clause License
44
#
@@ -1348,4 +1348,4 @@ def forward(self, x, normal_scale=6/255, default_scale=0.1, default_zero_point=1
13481348
if return_kl:
13491349
return out, 0
13501350

1351-
return out
1351+
return out

bayesian_torch/layers/flipout_layers/quantized_linear_flipout.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2021 Intel Labs
1+
# Copyright (C) 2023 Intel Labs
22
#
33
# BSD-3-Clause License
44
#

bayesian_torch/layers/flipout_layers/rnn_flipout.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2021 Intel Labs
1+
# Copyright (C) 2023 Intel Labs
22
#
33
# BSD-3-Clause License
44
#

bayesian_torch/layers/variational_layers/conv_variational.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2021 Intel Labs
1+
# Copyright (C) 2023 Intel Labs
22
#
33
# BSD-3-Clause License
44
#

bayesian_torch/layers/variational_layers/linear_variational.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2021 Intel Labs
1+
# Copyright (C) 2023 Intel Labs
22
#
33
# BSD-3-Clause License
44
#

bayesian_torch/layers/variational_layers/quantize_conv_variational.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2021 Intel Labs
1+
# Copyright (C) 2023 Intel Labs
22
#
33
# BSD-3-Clause License
44
#
@@ -1489,4 +1489,4 @@ def forward(self, input, enable_int8_compute=True, normal_scale=6/255, default_s
14891489
if return_kl:
14901490
return out, 0 # disable kl divergence computing
14911491

1492-
return out
1492+
return out

bayesian_torch/layers/variational_layers/quantize_linear_variational.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2021 Intel Labs
1+
# Copyright (C) 2023 Intel Labs
22
#
33
# BSD-3-Clause License
44
#

bayesian_torch/layers/variational_layers/rnn_variational.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2021 Intel Labs
1+
# Copyright (C) 2023 Intel Labs
22
#
33
# BSD-3-Clause License
44
#

bayesian_torch/models/bnn_to_qbnn.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2021 Intel Labs
1+
# Copyright (C) 2023 Intel Labs
22
#
33
# BSD-3-Clause License
44
#
@@ -256,4 +256,4 @@ def forward(self, x):
256256
print(m)
257257
if input.dtype!=torch.quint8:
258258
input = torch.quantize_per_tensor(input, 0.1, 128, torch.quint8)
259-
print(m(input))
259+
print(m(input))

bayesian_torch/models/dnn_to_bnn.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2021 Intel Labs
1+
# Copyright (C) 2023 Intel Labs
22
#
33
# BSD-3-Clause License
44
#
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
model=resnet20
4+
mode='ptq'
5+
batch_size=1000
6+
num_monte_carlo=20
7+
checkpoint_file=./checkpoint/bayesian/bayesian_resnet20_cifar.pth
8+
9+
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

bayesian_torch/utils/avuc_loss.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2021 Intel Corporation
1+
# Copyright (C) 2023 Intel Corporation
22
#
33
# BSD-3-Clause License
44
#

bayesian_torch/utils/util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (C) 2021 Intel Labs
1+
# Copyright (C) 2023 Intel Labs
22
#
33
# BSD-3-Clause License
44
#

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
setup(
1212
name = "bayesian-torch",
1313
packages = find_packages(),
14-
version = "0.3.0",
14+
version = "0.4.0",
1515
description = "A library for Bayesian neural network layers and uncertainty estimation in Deep Learning",
1616
author = "Intel Labs",
1717
author_email = "[email protected]",

0 commit comments

Comments
 (0)