| 34 | } |
| 35 | |
| 36 | static Graph* ColCumsum(int num_x, int num_y, bool reverse = false) { |
| 37 | auto* g = new Graph(OpRegistry::Global()); |
| 38 | Tensor data(DT_FLOAT, TensorShape({num_x, num_y})); |
| 39 | data.flat<float>().setRandom(); |
| 40 | Tensor axes(DT_INT32, TensorShape({})); |
| 41 | axes.flat<int32>()(0) = 0; |
| 42 | test::graph::Cumsum(g, test::graph::Constant(g, data), |
| 43 | test::graph::Constant(g, axes)); |
| 44 | return g; |
| 45 | } |
| 46 | |
| 47 | static Graph* RowCumsum(int num_x, int num_y, bool reverse = false) { |
| 48 | auto* g = new Graph(OpRegistry::Global()); |
no test coverage detected