diff options
author | Clement Farabet <clement.farabet@gmail.com> | 2012-10-27 23:11:06 +0400 |
---|---|---|
committer | Clement Farabet <clement.farabet@gmail.com> | 2012-10-27 23:11:06 +0400 |
commit | dcaf75da2001c98043ecd27f8b12413dd27e75af (patch) | |
tree | b8b267d10e51f33f366084aec06d183af7d4c94d /VolumetricConvolution.lua | |
parent | 6160010cbc434e02ab3b8f2c414afd96a5fb2c30 (diff) |
Faster reset for 'nn' modules.
Diffstat (limited to 'VolumetricConvolution.lua')
-rw-r--r-- | VolumetricConvolution.lua | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/VolumetricConvolution.lua b/VolumetricConvolution.lua index 4262199..80b8ec7 100644 --- a/VolumetricConvolution.lua +++ b/VolumetricConvolution.lua @@ -30,12 +30,8 @@ function VolumetricConvolution:reset(stdv) else stdv = 1/math.sqrt(self.kT*self.kW*self.kH*self.nInputPlane) end - self.weight:apply(function() - return torch.uniform(-stdv, stdv) - end) - self.bias:apply(function() - return torch.uniform(-stdv, stdv) - end) + self.weight:uniform(-stdv, stdv) + self.bias:uniform(-stdv, stdv) end function VolumetricConvolution:updateOutput(input) |