aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/layers/Pooling3dLayer.hpp
diff options
context:
space:
mode:
authorTamás Nyíri <tamas.nyiri@arm.com>2021-10-26 14:47:57 +0100
committerTamas Nyiri <tamas.nyiri@arm.com>2021-11-17 11:31:44 +0000
commit7b885b3cce70154596b1994b013ea91527117c26 (patch)
treecdc2ee30a6dc03a4e26e6783a84ccd9be867242a /src/armnn/layers/Pooling3dLayer.hpp
parent888a363115e0bf47f227c9db6fc1dbfe0418f69c (diff)
downloadarmnn-7b885b3cce70154596b1994b013ea91527117c26.tar.gz
IVGCVSW-6509 Front End + Reference Workload implementation
Subtask of story: IVGCVSW-6164 Add a Pooling3d FrontEnd and Ref Implementation * Add front end * Add reference workload * Add corresponding unit tests Change-Id: Icce4146dd0a06a1da46a2def00a82d343e171750 Signed-off-by: Tamas Nyiri <tamas.nyiri@arm.com>
Diffstat (limited to 'src/armnn/layers/Pooling3dLayer.hpp')
-rw-r--r--src/armnn/layers/Pooling3dLayer.hpp52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/armnn/layers/Pooling3dLayer.hpp b/src/armnn/layers/Pooling3dLayer.hpp
new file mode 100644
index 0000000000..0aa48535c0
--- /dev/null
+++ b/src/armnn/layers/Pooling3dLayer.hpp
@@ -0,0 +1,52 @@
+//
+// Copyright © 2021 Arm Ltd and Contributors. All rights reserved.
+// SPDX-License-Identifier: MIT
+//
+#pragma once
+
+#include "LayerWithParameters.hpp"
+
+namespace armnn
+{
+
+/// This layer represents a pooling 3d operation.
+class Pooling3dLayer : public LayerWithParameters<Pooling3dDescriptor>
+{
+public:
+ /// Makes a workload for the Pooling3d type.
+ /// @param [in] graph The graph where this layer can be found.
+ /// @param [in] factory The workload factory which will create the workload.
+ /// @return A pointer to the created workload, or nullptr if not created.
+ virtual std::unique_ptr<IWorkload> CreateWorkload(const IWorkloadFactory& factory) const override;
+
+ /// Creates a dynamically-allocated copy of this layer.
+ /// @param [in] graph The graph into which this layer is being cloned.
+ Pooling3dLayer* Clone(Graph& graph) const override;
+
+ /// Check if the input tensor shape(s)
+ /// will lead to a valid configuration of @ref Pooling3dLayer.
+ /// @param [in] shapeInferenceMethod Indicates if output shape shall be overwritten or just validated.
+ void ValidateTensorShapesFromInputs() override;
+
+ /// By default returns inputShapes if the number of inputs are equal to number of outputs,
+ /// otherwise infers the output shapes from given input shapes and layer properties.
+ /// @param [in] inputShapes The input shapes layer has.
+ /// @return A vector to the inferred output shape.
+ std::vector<TensorShape> InferOutputShapes(const std::vector<TensorShape>& inputShapes) const override;
+
+ ARMNN_NO_DEPRECATE_WARN_BEGIN
+ void Accept(ILayerVisitor& visitor) const override;
+ ARMNN_NO_DEPRECATE_WARN_END
+
+
+protected:
+ /// Constructor to create a Pooling3dLayer.
+ /// @param [in] param Pooling3dDescriptor to configure the pooling3d operation.
+ /// @param [in] name Optional name for the layer.
+ Pooling3dLayer(const Pooling3dDescriptor& param, const char* name);
+
+ /// Default destructor
+ ~Pooling3dLayer() = default;
+};
+
+} // namespace