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

github.com/clementfarabet/lua---nnx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Bakhtin <anton@(surname).ru>2015-04-04 13:23:45 +0300
committerAnton Bakhtin <anton@(surname).ru>2015-04-04 13:23:45 +0300
commitc1525e68611eee69d401bc5e0e5161fad8614d55 (patch)
tree43997212db80e7824d79923f4ebfd1ca1e32c0f5 /SoftMaxTree.lua
parentb10c3aa2b51b3c6c848c4d8d2c2517ac59872269 (diff)
Fix SoftMaxTree:sharedClone
See https://github.com/clementfarabet/lua---nnx/issues/35
Diffstat (limited to 'SoftMaxTree.lua')
-rw-r--r--SoftMaxTree.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/SoftMaxTree.lua b/SoftMaxTree.lua
index e3ff61e..7ca6c5e 100644
--- a/SoftMaxTree.lua
+++ b/SoftMaxTree.lua
@@ -325,10 +325,8 @@ function SoftMaxTree:sharedClone()
smt.childParent = self.childParent
smt.maxFamilyPath = self.maxFamilyPath
smt.maxDept = self.maxDept
- if not self.accUpdate then
- smt.gradWeight = self.gradWeight:clone()
- smt.gradBias = self.gradBias:clone()
- end
+ smt.gradWeight = self.gradWeight
+ smt.gradBias = self.gradBias
if type == 'torch.CudaTensor' then
smt.parentChildrenCuda = self.parentChildrenCuda
smt.childParentCuda = self.childParentCuda