Skip to content

Commit 16defed

Browse files
committed
Fix typo in readme example
1 parent aa26892 commit 16defed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ from bnn.ops import BasicInputBinarizer, BasicScaleBinarizer, XNORWeightBinarize
4545
model = models.resnet18(pretrained=False)
4646

4747
# Define the binarization configuration and assign it to the model
48-
model.bconfig = BConfig(
48+
bconfig = BConfig(
4949
activation_pre_process = BasicInputBinarizer,
5050
activation_post_process = BasicScaleBinarizer,
5151
# optionally, one can pass certain custom variables
@@ -106,7 +106,7 @@ class CustomInputBinarizer(nn.Module):
106106
return torch.tanh(x) # operate on the conv_output
107107

108108
# apply the custom functions into the binarization model
109-
model.bconfig = BConfig(
109+
bconfig = BConfig(
110110
activation_pre_process = CustomInputBinarizer,
111111
activation_post_process = CustomOutputBinarizer,
112112
weight_pre_process = nn.Identity # this will keep the weights real

0 commit comments

Comments
 (0)