aboutsummaryrefslogtreecommitdiff
path: root/ConversionUtils.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'ConversionUtils.hpp')
-rw-r--r--ConversionUtils.hpp45
1 files changed, 9 insertions, 36 deletions
diff --git a/ConversionUtils.hpp b/ConversionUtils.hpp
index 165c63b7..783f7cec 100644
--- a/ConversionUtils.hpp
+++ b/ConversionUtils.hpp
@@ -985,47 +985,20 @@ bool ConvertPooling2d(const HalOperation& operation,
}
}
- // ArmNN does not accept a pool size of 1, but the ArmNN driver is expected to cope.
- // This is mapped to a trivial splitter instead.
armnn::IConnectableLayer* startLayer = nullptr;
- if (desc.m_PoolWidth != 1 || desc.m_PoolHeight != 1)
- {
- if (!IsLayerSupported(__func__,
- armnn::IsPooling2dSupported,
- data.m_Compute,
- swizzledInputInfo,
- swizzledOutputInfo,
- desc))
- {
- return false;
- }
- startLayer = data.m_Network->AddPooling2dLayer(desc);
- }
- else
+ if (!IsLayerSupported(__func__,
+ armnn::IsPooling2dSupported,
+ data.m_Compute,
+ swizzledInputInfo,
+ swizzledOutputInfo,
+ desc))
{
- const unsigned int numDims = swizzledOutputInfo.GetNumDimensions();
-
- armnn::ViewsDescriptor viewsDesc(1, numDims);
-
- for (unsigned int i = 0; i < numDims; ++i)
- {
- viewsDesc.SetViewOriginCoord(0, i, 0);
- viewsDesc.SetViewSize(0, i, swizzledOutputInfo.GetShape()[i]);
- }
-
- if (!IsLayerSupported(__func__,
- armnn::IsSplitterSupported,
- data.m_Compute,
- swizzledInputInfo,
- viewsDesc))
- {
- return false;
- }
-
- startLayer = data.m_Network->AddSplitterLayer(viewsDesc);
+ return false;
}
+ startLayer = data.m_Network->AddPooling2dLayer(desc);
+
armnn::IConnectableLayer* endLayer = ProcessActivation(swizzledOutputInfo, activation, startLayer, data);
if (endLayer != nullptr)