aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/CL/functions/CLPoolingLayer.cpp6
-rw-r--r--src/runtime/NEON/functions/NEPoolingLayer.cpp2
2 files changed, 6 insertions, 2 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;
diff --git a/src/runtime/NEON/functions/NEPoolingLayer.cpp b/src/runtime/NEON/functions/NEPoolingLayer.cpp
index e1619188d1..6b87189c2b 100644
--- a/src/runtime/NEON/functions/NEPoolingLayer.cpp
+++ b/src/runtime/NEON/functions/NEPoolingLayer.cpp
@@ -41,7 +41,7 @@ void NEPoolingLayer::configure(ITensor *input, ITensor *output, const PoolingLay
_is_global_pooling_layer = (input->info()->dimension(0) == pool_info.pool_size.width) && (input->info()->dimension(1) == pool_info.pool_size.height);
// Get data layout
- _data_layout = input->info()->data_layout();
+ _data_layout = pool_info.data_layout == DataLayout::UNKNOWN ? input->info()->data_layout() : pool_info.data_layout;
// Configure pooling kernel
_pooling_layer_kernel.configure(input, output, pool_info);