diff options
author | Kaiyu Yang <yangky11@Kaiyus-MacBook-Pro.local> | 2016-04-18 08:14:54 +0300 |
---|---|---|
committer | Kaiyu Yang <yangky11@2379591006.vpn.umich.net> | 2016-04-18 11:10:53 +0300 |
commit | 651103f3aabc2dd154d6bd95ad565d14009255e6 (patch) | |
tree | 4039df5b08d0fdcd2b8522a0e70ffba6bb47eef4 /Linear.lua | |
parent | 9cffea51a9a5065342d6ea80f965d5fad32729e1 (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.lua | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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) |