示例#1
0
 def test_softmax(self):
     dout = TheanoInterval.derest_output(1000)
     start_time = timeit.default_timer()
     din = d_softmax(dout)
     constr_time = timeit.default_timer()
     l, u = din.eval()
     ex_time = timeit.default_timer()
     self.check_time('d_softmax', start_time, constr_time, ex_time)
示例#2
0
 def test_3_outputs(self):
     dout = TheanoInterval.derest_output(3)
     din = d_softmax(dout)
     l, u = din.eval()
     array_almost_equal(l, u)
     array_almost_equal(l, A([[1, 0, 0], [0, 1, 0], [0, 0, 1]]))
示例#3
0
 def test_1_output(self):
     dout = TheanoInterval.derest_output(1)
     din = d_softmax(dout)
     l, u = din.eval()
     array_almost_equal(l, u)
     array_almost_equal(l, A([[1]]))