| 35 | DataFlowGradTest() : scope_(Scope::NewRootScope()) {} |
| 36 | |
| 37 | void RunTest(const OutputList& xs, const std::vector<TensorShape>& x_shapes, |
| 38 | const OutputList& ys, const std::vector<TensorShape>& y_shapes) { |
| 39 | TF_ASSERT_OK(scope_.status()); |
| 40 | float max_error; |
| 41 | TF_ASSERT_OK((ComputeGradientError<float, float, float>( |
| 42 | scope_, xs, x_shapes, ys, y_shapes, &max_error))); |
| 43 | EXPECT_LT(max_error, 1e-4); |
| 44 | } |
| 45 | |
| 46 | Scope scope_; |
| 47 | }; |