コード例 #1
0
 def test_duplicate_axis(self):
     with self.assertRaises(ValueError):
         functions.Prod((0, 0))
コード例 #2
0
 def test_invalid_axis_type(self):
     with self.assertRaises(TypeError):
         functions.Prod([0])
コード例 #3
0
 def test_invalid_axis_type_in_tuple(self):
     with self.assertRaises(TypeError):
         functions.Prod((1, 'x'))
コード例 #4
0
 def check_backward(self, x_data, y_grad):
     gradient_check.check_backward(functions.Prod(self.axis, self.keepdims),
                                   x_data,
                                   y_grad,
                                   atol=1e-3,
                                   dtype=numpy.float64)