aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/CL/functions/CLPoolingLayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/CL/functions/CLPoolingLayer.cpp')
-rw-r--r--src/runtime/CL/functions/CLPoolingLayer.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/runtime/CL/functions/CLPoolingLayer.cpp b/src/runtime/CL/functions/CLPoolingLayer.cpp
index 00e5447875..883183492d 100644
--- a/src/runtime/CL/functions/CLPoolingLayer.cpp
+++ b/src/runtime/CL/functions/CLPoolingLayer.cpp
@@ -49,7 +49,11 @@ void CLPoolingLayer::configure(ICLTensor *input, ICLTensor *output, const Poolin
{
pixel_value = PixelValue(0, data_type, input->info()->quantization_info());
}
- switch(input->info()->data_layout())
+
+ // Data layout
+ const auto data_layout = pool_info.data_layout == DataLayout::UNKNOWN ? input->info()->data_layout() : pool_info.data_layout;
+
+ switch(data_layout)
{
case DataLayout::NCHW:
border_mode = (PoolingType::MAX == pool_info.pool_type) ? BorderMode::REPLICATE : BorderMode::CONSTANT;