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:38:11 +0300
committerAnton Bakhtin <anton@(surname).ru>2015-04-04 13:38:11 +0300
commitc7a353f5331122dd1f937ae12769ac18642f0c41 (patch)
tree27121aed6ad513b54b34ecbe732213782f58997d
parentc1525e68611eee69d401bc5e0e5161fad8614d55 (diff)
Fix previous commit
-rw-r--r--SoftMaxTree.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/SoftMaxTree.lua b/SoftMaxTree.lua
index 7ca6c5e..1187600 100644
--- a/SoftMaxTree.lua
+++ b/SoftMaxTree.lua
@@ -325,8 +325,10 @@ function SoftMaxTree:sharedClone()
smt.childParent = self.childParent
smt.maxFamilyPath = self.maxFamilyPath
smt.maxDept = self.maxDept
- smt.gradWeight = self.gradWeight
- smt.gradBias = self.gradBias
+ if not self.accUpdate then
+ smt.gradWeight = self.gradWeight
+ smt.gradBias = self.gradBias
+ end
if type == 'torch.CudaTensor' then
smt.parentChildrenCuda = self.parentChildrenCuda
smt.childParentCuda = self.childParentCuda