| 33 | ArrayGradTest() : scope_(Scope::NewRootScope()) {} |
| 34 | |
| 35 | void RunTest(const Output& x, const TensorShape& x_shape, const Output& y, |
| 36 | const TensorShape& y_shape) { |
| 37 | TF_ASSERT_OK(scope_.status()); |
| 38 | float max_error; |
| 39 | TF_ASSERT_OK((ComputeGradientError<float, float, float>( |
| 40 | scope_, {x}, {x_shape}, {y}, {y_shape}, &max_error))); |
| 41 | EXPECT_LT(max_error, 1e-3); |
| 42 | } |
| 43 | |
| 44 | void RunTest(const OutputList& xs, const std::vector<TensorShape>& x_shapes, |
| 45 | const OutputList& ys, const std::vector<TensorShape>& y_shapes) { |