Skip to content

Commit 3d350b7

Browse files
committed
Fix CIFAR10 example
1 parent b45c083 commit 3d350b7

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

bnn/engine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from easydict import EasyDict as edict
44
from typing import List, Callable, Dict
55

6-
from . import BConfig, prepare_binary_model
6+
from . import BConfig, prepare_binary_model, Identity
77
from .ops import *
88

99

examples/cifar10.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
BasicInputBinarizer,
1515
XNORWeightBinarizer
1616
)
17-
from bnn import BConfig, prepare_binary_model
17+
from bnn import BConfig, prepare_binary_model, Identity
1818
from bnn.models.resnet import resnet18
1919

2020
from .utils import AverageMeter, ProgressMeter, accuracy
@@ -64,7 +64,7 @@
6464
print('==> Preparing the model for binarization')
6565
bconfig = BConfig(
6666
activation_pre_process = BasicInputBinarizer,
67-
activation_post_process = nn.Identity,
67+
activation_post_process = Identity,
6868
weight_pre_process = XNORWeightBinarizer
6969
)
7070
# first and last layer will be kept FP32

examples/recepies/xnor-net.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ step0:
33
pre_activation:
44
name: "BasicInputBinarizer"
55
post_activation:
6-
NAME: "nn.Identity"
6+
NAME: "Identity"
77
weight:
88
name: "XNORWeightBinarizer"
99
args:

0 commit comments

Comments
 (0)