Skip to content

Commit

Permalink
SpatialSubtractiveNormalization:clearState: clear cached size to mak…
Browse files Browse the repository at this point in the history
…e Travis happy (#1284)

* replace lon glong types with size_t

Work around bug in msvc compiler in win32 mode

* fix condition logic for coef recalculation in  SpatialSubtractiveNormalization

Existing conditional expression always verified, resulting in overhead
as coeffcients were recalculated every time. Fix and simplify expression
by using chached input size.

* SpatialSubtractiveNormalization:clearState: clear cached size to make Travis happy
  • Loading branch information
elikosan authored and soumith committed Oct 2, 2017
1 parent d135408 commit 8726825
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions SpatialSubtractiveNormalization.lua
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ function SpatialSubtractiveNormalization:updateGradInput(input, gradOutput)
end

function SpatialSubtractiveNormalization:clearState()
self._inpsz = nil
if self.ones then self.ones:set() end
if self._coef then self._coef:set() end
self.meanestimator:clearState()
Expand Down

0 comments on commit 8726825

Please sign in to comment.