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:
authorKaiyu Yang <yangky11@Kaiyus-MacBook-Pro.local>2016-04-18 08:14:54 +0300
committerKaiyu Yang <yangky11@2379591006.vpn.umich.net>2016-04-18 11:10:53 +0300
commit651103f3aabc2dd154d6bd95ad565d14009255e6 (patch)
tree4039df5b08d0fdcd2b8522a0e70ffba6bb47eef4 /Linear.lua
parent9cffea51a9a5065342d6ea80f965d5fad32729e1 (diff)
add noBias for nn.Linear and nn.SpatialConvolution
remove files add noBias for nn.Linear and nn.SpatialConvolution do not allocate new buffers when in noBias fix a typo fix a typo add noBias for nn.Linear and nn.SpatialConvolution
Diffstat (limited to 'Linear.lua')
-rw-r--r--Linear.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/Linear.lua b/Linear.lua
index cd23689..c26ba37 100644
--- a/Linear.lua
+++ b/Linear.lua
@@ -12,6 +12,12 @@ function Linear:__init(inputSize, outputSize, bias)
self:reset()
end
+function Linear:noBias()
+ self.bias = nil
+ self.gradBias = nil
+ return self
+end
+
function Linear:reset(stdv)
if stdv then
stdv = stdv * math.sqrt(3)