diff options
author | Clement Farabet <clement.farabet@gmail.com> | 2011-07-06 08:07:19 +0400 |
---|---|---|
committer | Clement Farabet <clement.farabet@gmail.com> | 2011-07-06 08:07:19 +0400 |
commit | 920511c8605c0938e5b08b2a80cbf331306fda39 (patch) | |
tree | 22f5ff100f71d98e16ffafb9e905b17d9b28323c /SpatialLinear.lua | |
parent | 9ffeaf7f010781543e5978d7a6be6eccb17c9585 (diff) |
Fixed most problems with jaobian tester
Diffstat (limited to 'SpatialLinear.lua')
-rw-r--r-- | SpatialLinear.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/SpatialLinear.lua b/SpatialLinear.lua index 6e16359..1cf850e 100644 --- a/SpatialLinear.lua +++ b/SpatialLinear.lua @@ -24,8 +24,8 @@ function SpatialLinear:reset(stdv) else stdv = 1./math.sqrt(self.weight:size(1)) end - for i=1,self.weight:size(2) do - self.weight:select(2, i):apply(function() + for i=1,self.weight:size(1) do + self.weight:select(1, i):apply(function() return random.uniform(-stdv, stdv) end) self.bias[i] = random.uniform(-stdv, stdv) |