Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/nn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'VolumetricConvolution.lua')
-rw-r--r--VolumetricConvolution.lua17
1 files changed, 11 insertions, 6 deletions
diff --git a/VolumetricConvolution.lua b/VolumetricConvolution.lua
index 4262199..4dec9e3 100644
--- a/VolumetricConvolution.lua
+++ b/VolumetricConvolution.lua
@@ -30,12 +30,17 @@ 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)
+ if nn.oldSeed then
+ self.weight:apply(function()
+ return torch.uniform(-stdv, stdv)
+ end)
+ self.bias:apply(function()
+ return torch.uniform(-stdv, stdv)
+ end)
+ else
+ self.weight:uniform(-stdv, stdv)
+ self.bias:uniform(-stdv, stdv)
+ end
end
function VolumetricConvolution:updateOutput(input)