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

github.com/torch/nn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSoumith Chintala <soumith@gmail.com>2014-05-12 19:27:54 +0400
committerSoumith Chintala <soumith@gmail.com>2014-05-12 19:27:54 +0400
commit900e8522fd2cd759803babde7bf8bae43daacaf3 (patch)
treef05f952cf8b8250ed10864fb0dce424564ac0202 /test
parent3b537ffa5a60c772439787afba418255ca83791a (diff)
fixing BCECriterion, adding test, closing https://github.com/torch/nn/pull/10
Diffstat (limited to 'test')
-rw-r--r--test/test.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test.lua b/test/test.lua
index 7eb2d44..e3b6a50 100644
--- a/test/test.lua
+++ b/test/test.lua
@@ -443,6 +443,13 @@ function nntest.WeightedMSECriterion()
criterionJacobianTest(cri, input, target)
end
+function nntest.BCECriterion()
+ local input = torch.rand(100)
+ local target = input:clone():add(torch.rand(100))
+ local cri = nn.BCECriterion()
+ criterionJacobianTest(cri, input, target)
+end
+
function nntest.LogSigmoid()
local ini = math.random(10,20)
local inj = math.random(10,20)