diff options
author | Soumith Chintala <soumith@gmail.com> | 2014-05-12 19:27:54 +0400 |
---|---|---|
committer | Soumith Chintala <soumith@gmail.com> | 2014-05-12 19:27:54 +0400 |
commit | 900e8522fd2cd759803babde7bf8bae43daacaf3 (patch) | |
tree | f05f952cf8b8250ed10864fb0dce424564ac0202 /test | |
parent | 3b537ffa5a60c772439787afba418255ca83791a (diff) |
fixing BCECriterion, adding test, closing https://github.com/torch/nn/pull/10
Diffstat (limited to 'test')
-rw-r--r-- | test/test.lua | 7 |
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) |