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

Function GetTensorInfo

src/armnnUtils/TensorUtils.cpp:40–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40TensorInfo GetTensorInfo(unsigned int numberOfBatches,
41 unsigned int numberOfChannels,
42 unsigned int height,
43 unsigned int width,
44 const DataLayout dataLayout,
45 const DataType dataType)
46{
47 switch (dataLayout)
48 {
49 case DataLayout::NCHW:
50 return TensorInfo({numberOfBatches, numberOfChannels, height, width}, dataType);
51 case DataLayout::NHWC:
52 return TensorInfo({numberOfBatches, height, width, numberOfChannels}, dataType);
53 default:
54 throw InvalidArgumentException("Unknown data layout ["
55 + std::to_string(static_cast<int>(dataLayout)) +
56 "]", CHECK_LOCATION());
57 }
58}
59
60TensorInfo GetTensorInfo(unsigned int numberOfBatches,
61 unsigned int numberOfChannels,

Callers 15

CopyOutToMethod · 0.85
CopyInFromMethod · 0.85
ExecuteMethod · 0.85
ExecuteMethod · 0.85
ExecuteMethod · 0.85
ExecuteMethod · 0.85
ExecuteMethod · 0.85
ExecuteMethod · 0.85
ExecuteMethod · 0.85
ExecuteMethod · 0.85
ExecuteMethod · 0.85
ExecuteMethod · 0.85

Calls 3

TensorInfoClass · 0.50
to_stringFunction · 0.50