Skip to content

Commit

Permalink
adding back assertion until a proper backward is added
Browse files Browse the repository at this point in the history
  • Loading branch information
soumith committed Apr 14, 2016
1 parent 9cffea5 commit 7111bce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions BatchNormalization.lua
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ end
local function backward(self, input, gradOutput, scale, gradInput, gradWeight, gradBias)
self:checkInputDim(input)
self:checkInputDim(gradOutput)
assert(self.train == true, 'should be in training mode when self.train is true')
assert(self.save_mean and self.save_std, 'must call :updateOutput() first')

input, gradOutput = makeContiguous(self, input, gradOutput)
Expand Down

0 comments on commit 7111bce

Please sign in to comment.