| 79 | } |
| 80 | |
| 81 | armnn::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 | } |
no test coverage detected