diff options
author | Sergey Zagoruyko <sergey.zagoruyko@imagine.enpc.fr> | 2015-02-05 16:48:42 +0300 |
---|---|---|
committer | Sergey Zagoruyko <sergey.zagoruyko@imagine.enpc.fr> | 2015-02-05 16:48:42 +0300 |
commit | 227fedec91f6d7f38e8bb62fcfd32c2316af634f (patch) | |
tree | 3c9d148f03510f38d1eb5462350ba819ce961493 /test.lua | |
parent | 5137714bae52c59bc663c0a57dd730712130457d (diff) |
multimargin supports p=2
Diffstat (limited to 'test.lua')
-rw-r--r-- | test.lua | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -693,6 +693,13 @@ function nntest.MarginCriterion() criterionJacobianTest1D(cri, input, target) end +function nntest.MultiMarginCriterion() + local input = torch.rand(100) + local target = math.random(1,100) + local cri = nn.MultiMarginCriterion(math.random(1,2)) + criterionJacobianTest1D(cri, input, target) +end + function nntest.WeightedMSECriterion() local input = torch.rand(10) local target = input:clone():add(torch.rand(10)) |