示例#1
0
 def test_argmax_axis1(self):
     be = CPU()
     tsr = be.array([[-1, 10], [11, 9]])
     out = be.empty((2, ))
     be.argmax(tsr, 1, out)
     assert_tensor_equal(out, CPUTensor([1, 0]))
示例#2
0
 def test_argmax_axis1(self):
     be = CPU()
     tsr = be.array([[-1, 10], [11, 9]])
     out = be.empty((2, ))
     be.argmax(tsr, 1, out)
     assert_tensor_equal(out, CPUTensor([1, 0]))
示例#3
0
 def test_argmax_noaxis(self):
     be = CPU()
     tsr = be.array([[-1, 0], [1, 92]])
     out = be.empty([1, 1])
     be.argmax(tsr, None, out)
     assert_tensor_equal(out, CPUTensor(3))
示例#4
0
 def test_argmax_noaxis(self):
     be = CPU()
     tsr = be.array([[-1, 0], [1, 92]])
     out = be.empty([1, 1])
     be.argmax(tsr, None, out)
     assert_tensor_equal(out, CPUTensor(3))