Created
March 8, 2016 15:15
-
-
Save jnordberg/0e53674a4dd0810b28e0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/mylib/mrf.lua b/mylib/mrf.lua | |
index ef65bd4..0b86b91 100755 | |
--- a/mylib/mrf.lua | |
+++ b/mylib/mrf.lua | |
@@ -149,7 +149,21 @@ function MRFMM:updateGradInput(input, gradOutput) | |
self.nOutputPlane = i_end - i_start + 1 | |
-- local timer_CONV = torch.Timer() | |
- local temp = input.nn.SpatialConvolutionMM_updateOutput(self, input) | |
+ -- local temp = input.nn.SpatialConvolutionMM_updateOutput(self, input) | |
+ local subBias = self.bias:sub(i_start, i_end) | |
+ | |
+ input.THNN.SpatialConvolutionMM_updateOutput( | |
+ input:cdata(), | |
+ self.output:cdata(), | |
+ self.weight:cdata(), | |
+ subBias:cdata(), | |
+ self.finput:cdata(), | |
+ self.fgradInput:cdata(), | |
+ self.kW, self.kH, | |
+ self.dW, self.dH, | |
+ self.padW, self.padH | |
+ ) | |
+ local temp = self.output | |
-- t_conv = t_conv + timer_CONV:time().real | |
-- normalize w.r.t source_mrfnorm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment