| 720 | NaryGradTest() : scope_(Scope::NewRootScope().WithDevice("/cpu:0")) {} |
| 721 | |
| 722 | void RunTest(const OutputList& xs, const std::vector<TensorShape>& x_shapes, |
| 723 | const OutputList& ys, const std::vector<TensorShape>& y_shapes) { |
| 724 | TF_ASSERT_OK(scope_.status()); |
| 725 | float max_error; |
| 726 | TF_ASSERT_OK((ComputeGradientError<float, float, float>( |
| 727 | scope_, xs, x_shapes, ys, y_shapes, &max_error))); |
| 728 | EXPECT_LT(max_error, 1e-3); |
| 729 | } |
| 730 | |
| 731 | void RunTest(const Output& x, const Tensor& x_init_value, const Output& y, |
| 732 | const TensorShape& y_shape) { |