MCPcopy Create free account
hub / github.com/ARM-software/armnn / MakeTensorShape

Function MakeTensorShape

src/armnnTestUtils/CommonTestUtils.cpp:81–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81armnn::TensorShape MakeTensorShape(unsigned int batches,
82 unsigned int channels,
83 unsigned int height,
84 unsigned int width,
85 armnn::DataLayout layout)
86{
87 using namespace armnn;
88 switch (layout)
89 {
90 case DataLayout::NCHW:
91 return TensorShape{ batches, channels, height, width };
92 case DataLayout::NHWC:
93 return TensorShape{ batches, height, width, channels };
94 default:
95 throw InvalidArgumentException(std::string("Unsupported data layout: ") + GetDataLayoutName(layout));
96 }
97}

Callers 2

ResizeEndToEndFunction · 0.85

Calls 2

GetDataLayoutNameFunction · 0.85

Tested by

no test coverage detected