diff options
author | nicholas-leonard <nick@nikopia.org> | 2016-01-19 19:23:22 +0300 |
---|---|---|
committer | nicholas-leonard <nick@nikopia.org> | 2016-01-19 19:23:22 +0300 |
commit | a335f9ae41c0c56251b526d7a502a03feb513e59 (patch) | |
tree | ef4d91259dedfd11a60a1b88974c17ec5b661363 /test | |
parent | c080463dfcfc1cf0f2eac3628ce956141f854a8b (diff) |
sharedClone is handled by dpnn
Diffstat (limited to 'test')
-rw-r--r-- | test/test-all.lua | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/test-all.lua b/test/test-all.lua index f595a41..df7b7bb 100644 --- a/test/test-all.lua +++ b/test/test-all.lua @@ -484,10 +484,12 @@ function nnxtest.SoftMaxTree() mytester:assertTensorEq(bias, linear.bias, 0.000001) mytester:assertTensorEq(gradBias, linear.gradBias, 0.000001) -- sharedClone - local smt2 = smt:sharedClone() - output = smt:forward{input, target} - local output2 = smt2:forward{input, target} - mytester:assertTensorEq(output, output2, 0.00001) + if pcall(function() require "dpnn" end) then + local smt2 = smt:sharedClone() + output = smt:forward{input, target} + local output2 = smt2:forward{input, target} + mytester:assertTensorEq(output, output2, 0.00001) + end -- accUpdate local smt3 = nn.SoftMaxTree(100, hierarchy, root_id, true) smt3:zeroGradParameters() |