| 20 | using PoolingAlgorithm = armnn::PoolingAlgorithm; |
| 21 | |
| 22 | float DefaultInitializer(PoolingAlgorithm algorithm) |
| 23 | { |
| 24 | switch (algorithm) |
| 25 | { |
| 26 | case PoolingAlgorithm::Max: |
| 27 | { |
| 28 | return std::numeric_limits<float>::lowest(); |
| 29 | } |
| 30 | case PoolingAlgorithm::Average: |
| 31 | case PoolingAlgorithm::L2: |
| 32 | { |
| 33 | return 0.0f; |
| 34 | } |
| 35 | default: |
| 36 | { |
| 37 | throw armnn::InvalidArgumentException("Unsupported pooling algorithm"); |
| 38 | } |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | using Accumulator = std::function<void(float & accu, float value)>; |
| 43 |
no test coverage detected