diff options
author | Anton Bakhtin <anton@(surname).ru> | 2015-04-04 13:38:11 +0300 |
---|---|---|
committer | Anton Bakhtin <anton@(surname).ru> | 2015-04-04 13:38:11 +0300 |
commit | c7a353f5331122dd1f937ae12769ac18642f0c41 (patch) | |
tree | 27121aed6ad513b54b34ecbe732213782f58997d | |
parent | c1525e68611eee69d401bc5e0e5161fad8614d55 (diff) |
Fix previous commit
-rw-r--r-- | SoftMaxTree.lua | 6 |
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 |