Пример #1
0
 def test_reduce_max_axis_value(self):
     self.assertTrue(
         np.array_equal(reduce_max(self.test_np, axis=0), [3, 3]))
Пример #2
0
 def test_reduce_max_torch_value(self):
     self.assertTrue(np.array_equal(reduce_max(self.test_torch).numpy(), 4))
Пример #3
0
 def test_reduce_max_torch_type(self):
     self.assertIsInstance(reduce_max(self.test_torch), torch.Tensor,
                           'Output type must be torch.Tensor')
Пример #4
0
 def test_reduce_max_tf_type(self):
     self.assertIsInstance(reduce_max(self.test_tf), tf.Tensor,
                           'Output type must be tf.Tensor')
Пример #5
0
 def test_reduce_max_np_value(self):
     self.assertEqual(reduce_max(self.test_np), 3)
Пример #6
0
 def test_reduce_max_np_type(self):
     self.assertIsInstance(reduce_max(self.test_np), np.ScalarType,
                           'Output type must be NumPy')