MCPcopy Create free account
hub / github.com/OAID/Tengine / InferShape

Method InferShape

operator/operator/reorg.cpp:27–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25
26namespace TEngine {
27bool 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
46void Reorg::SetSchema(void)
47{

Callers

nothing calls this directly

Calls 7

GetNMethod · 0.80
GetCMethod · 0.80
GetHMethod · 0.80
GetWMethod · 0.80
SetDimMethod · 0.80
SetDataLayoutMethod · 0.80
GetDataLayoutMethod · 0.80

Tested by

no test coverage detected