Esempio n. 1
0
 def test_reduce_min_axis(self):
     self.assertTrue(
         np.array_equal(reduce_min(self.test_np, axis=0), [1, 2]))
Esempio n. 2
0
 def test_reduce_min_torch_value(self):
     self.assertTrue(np.array_equal(
         reduce_min(self.test_torch).numpy(), -3))
Esempio n. 3
0
 def test_reduce_min_torch_type(self):
     self.assertIsInstance(reduce_min(self.test_torch), torch.Tensor,
                           'Output type must be torch.Tensor')
Esempio n. 4
0
 def test_reduce_min_tf_type(self):
     self.assertIsInstance(reduce_min(self.test_tf), tf.Tensor,
                           'Output type must be tf.Tensor')
Esempio n. 5
0
 def test_reduce_min_np_value(self):
     self.assertEqual(reduce_min(self.test_np), 1)
Esempio n. 6
0
 def test_reduce_min_np_type(self):
     self.assertIsInstance(reduce_min(self.test_np), np.ScalarType,
                           'Output type must be NumPy')