From 872682558c48ee661ebff693aa5a41fcdefa7873 Mon Sep 17 00:00:00 2001 From: Eric Cosatto Date: Mon, 2 Oct 2017 16:02:38 -0400 Subject: [PATCH] SpatialSubtractiveNormalization:clearState: clear cached size to make 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 --- SpatialSubtractiveNormalization.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/SpatialSubtractiveNormalization.lua b/SpatialSubtractiveNormalization.lua index 7fa440267..d92614a8c 100644 --- a/SpatialSubtractiveNormalization.lua +++ b/SpatialSubtractiveNormalization.lua @@ -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()