Skip to content

Commit

Permalink
fix batchnorm reset
Browse files Browse the repository at this point in the history
  • Loading branch information
szagoruyko committed Oct 19, 2015
1 parent 89ad6c5 commit eb13695
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions BatchNormalization.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ end
function BN:reset()
self.weight:uniform()
self.bias:zero()
self.running_mean:zero()
self.running_std:fill(1)
end

function BN:updateOutput(input)
Expand Down
2 changes: 2 additions & 0 deletions SpatialBatchNormalization.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ end
function BN:reset()
self.weight:uniform()
self.bias:zero()
self.running_mean:zero()
self.running_std:fill(1)
end

function BN:updateOutput(input)
Expand Down

0 comments on commit eb13695

Please sign in to comment.