| 25 | |
| 26 | namespace TEngine { |
| 27 | bool Reorg::InferShape(const std::vector<TEngine::TShape>& ishape, std::vector<TEngine::TShape>& oshape, int layout) |
| 28 | { |
| 29 | const TShape& input = ishape[0]; |
| 30 | int n = input.GetN(); |
| 31 | int c = input.GetC(); |
| 32 | int h = input.GetH(); |
| 33 | int w = input.GetW(); |
| 34 | |
| 35 | TShape shape; |
| 36 | int stride = param_.stride; |
| 37 | std::vector<int> dim = {n, c * (stride * stride), h / stride, w / stride}; |
| 38 | |
| 39 | shape.SetDim(dim); |
| 40 | shape.SetDataLayout(input.GetDataLayout()); |
| 41 | |
| 42 | oshape[0] = shape; |
| 43 | return true; |
| 44 | } |
| 45 | |
| 46 | void Reorg::SetSchema(void) |
| 47 | { |
nothing calls this directly
no test coverage detected