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:
authorSergey Zagoruyko <zagoruyko2@gmail.com>2014-10-07 20:24:12 +0400
committerSoumith Chintala <soumith@gmail.com>2014-10-27 17:05:16 +0300
commit917653352905579322d9450dbecc9b33d238afc3 (patch)
tree4da01c1567c0f683158169175a2c1ae4608f6164 /test
parenta1cddee1ff2a9a0215727f1f8cc6b21691669ebb (diff)
modernized MarginCriterion
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 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))