Skip to content

Commit

Permalink
Fix bug in test that resulted in duplicate modules in a model
Browse files Browse the repository at this point in the history
  • Loading branch information
guyjacob committed Jul 21, 2019
1 parent 8afac56 commit 4ec96d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_post_train_quant.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,9 +600,9 @@ def __init__(self, act1_type, act2_type):
super(LinearBNSplitAct, self).__init__()
self.linear = nn.Linear(10, 40)
self.bn = nn.BatchNorm1d(40)
acts_map = {'relu': nn.ReLU(), 'tanh': nn.Tanh(), 'sigmoid': nn.Sigmoid()}
self.act1 = acts_map[act1_type]
self.act2 = acts_map[act2_type]
acts_map = {'relu': nn.ReLU, 'tanh': nn.Tanh, 'sigmoid': nn.Sigmoid}
self.act1 = acts_map[act1_type]()
self.act2 = acts_map[act2_type]()

def forward(self, x):
x = self.linear(x)
Expand Down

0 comments on commit 4ec96d9

Please sign in to comment.