Skip to content

Commit

Permalink
Merge branch '5-fix_layer_order' into 'master'
Browse files Browse the repository at this point in the history
Resolve "Fix layer order"

Closes apache#5

See merge request joseph.bethge/bmxnet!4
  • Loading branch information
Jopyth committed Sep 6, 2018
2 parents 3225a7d + 4614b9a commit 7f56939
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/mxnet/gluon/nn/binary_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ def hybrid_forward(self, F, x, weight, bias=None):
self._offset = 1
for dim_size in weight.shape[1:]:
self._offset *= dim_size
binary_x = binarize_inputs(F, self._apply_pre_padding(F, x), self._pre_bn)
binary_x = binarize_inputs(F, x, self._pre_bn)
binary_weight = binarize_weights(F, weight)
h = F.Convolution(binary_x, binary_weight, name='fwd', **self._kwargs)
binary_x_padded = self._apply_pre_padding(F, binary_x)
h = F.Convolution(binary_x_padded, binary_weight, name='fwd', **self._kwargs)
return (h + self._offset) / 2


Expand Down

0 comments on commit 7f56939

Please sign in to comment.