diff options
author | Sergey Zagoruyko <zagoruyko2@gmail.com> | 2014-10-07 20:24:12 +0400 |
---|---|---|
committer | Soumith Chintala <soumith@gmail.com> | 2014-10-27 17:05:16 +0300 |
commit | 917653352905579322d9450dbecc9b33d238afc3 (patch) | |
tree | 4da01c1567c0f683158169175a2c1ae4608f6164 /test | |
parent | a1cddee1ff2a9a0215727f1f8cc6b21691669ebb (diff) |
modernized MarginCriterion
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 aa1d062..a0644fe 100644 --- a/test/test.lua +++ b/test/test.lua @@ -481,6 +481,13 @@ function nntest.MSECriterion() criterionJacobianTest1D(cri, input, target) end +function nntest.MarginCriterion() + local input = torch.rand(100) + local target = input:clone():add(torch.rand(100)) + local cri = nn.MarginCriterion() + criterionJacobianTest1D(cri, input, target) +end + function nntest.WeightedMSECriterion() local input = torch.rand(100) local target = input:clone():add(torch.rand(100)) |