Mercurial > pylearn
comparison _nnet_ops.py @ 25:b63e8c0bf21b
added __init__.py, fixed crossentropy_softmax_1hot function name
author | bergstrj@iro.umontreal.ca |
---|---|
date | Thu, 10 Apr 2008 20:53:44 -0400 |
parents | 2e8be9f5412b |
children | bf0145fa73e8 |
comparison
equal
deleted
inserted
replaced
24:2e8be9f5412b | 25:b63e8c0bf21b |
---|---|
16 def setUp(self): | 16 def setUp(self): |
17 numpy.random.seed(9999) | 17 numpy.random.seed(9999) |
18 def test0(self): | 18 def test0(self): |
19 y_idx = [0,1,3] | 19 y_idx = [0,1,3] |
20 def output1(a): | 20 def output1(a): |
21 return cross_entropy_softmax_1hot(a, y_idx)[0:1] | 21 return crossentropy_softmax_1hot(a, y_idx)[0:1] |
22 TT.verify_grad(self, output1, [numpy.random.rand(3,4)]) | 22 TT.verify_grad(self, output1, [numpy.random.rand(3,4)]) |
23 | 23 |
24 | 24 |
25 | 25 |
26 if __name__ == '__main__': | 26 if __name__ == '__main__': |