| 45 | } |
| 46 | |
| 47 | static Graph* RowCumsum(int num_x, int num_y, bool reverse = false) { |
| 48 | auto* g = new Graph(OpRegistry::Global()); |
| 49 | Tensor data(DT_FLOAT, TensorShape({num_x, num_y})); |
| 50 | data.flat<float>().setRandom(); |
| 51 | Tensor axes(DT_INT32, TensorShape({})); |
| 52 | axes.flat<int32>()(0) = 1; |
| 53 | test::graph::Cumsum(g, test::graph::Constant(g, data), |
| 54 | test::graph::Constant(g, axes)); |
| 55 | return g; |
| 56 | } |
| 57 | |
| 58 | static Graph* ThreeDYCumsum(int num_y, int num_z, bool reverse = false) { |
| 59 | auto* g = new Graph(OpRegistry::Global()); |
no test coverage detected