| 48 | } |
| 49 | |
| 50 | static Graph* RowReduce(const string& reduce, int num_x, int num_y) { |
| 51 | auto* g = new Graph(OpRegistry::Global()); |
| 52 | Tensor data(DT_FLOAT, TensorShape({num_x, num_y})); |
| 53 | data.flat<float>().setRandom(); |
| 54 | Tensor axes(DT_INT32, TensorShape({1})); |
| 55 | axes.flat<int32>()(0) = 1; |
| 56 | test::graph::Reduce(g, reduce, test::graph::Constant(g, data), |
| 57 | test::graph::Constant(g, axes)); |
| 58 | return g; |
| 59 | } |
| 60 | |
| 61 | static Graph* ThreeDYReduce(const string& reduce, int num_y, int num_z) { |
| 62 | auto* g = new Graph(OpRegistry::Global()); |
no test coverage detected