diff options
Diffstat (limited to 'src/armnn/layers/ElementwiseBaseLayer.hpp')
-rw-r--r-- | src/armnn/layers/ElementwiseBaseLayer.hpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/armnn/layers/ElementwiseBaseLayer.hpp b/src/armnn/layers/ElementwiseBaseLayer.hpp index f0821ecfe9..5c2bbaa054 100644 --- a/src/armnn/layers/ElementwiseBaseLayer.hpp +++ b/src/armnn/layers/ElementwiseBaseLayer.hpp @@ -10,17 +10,30 @@ namespace armnn { -/// NOTE: this is an abstract class, it does not implement: -/// std::unique_ptr<IWorkload> Layer::CreateWorkload(const Graph& graph, const IWorkloadFactory& factory) const = 0; -/// Layer* Clone(Graph& graph) const = 0; +/// NOTE: this is an abstract class to encapsulate the element wise operations, it does not implement: +/// std::unique_ptr<IWorkload> Layer::CreateWorkload(const Graph& graph, const IWorkloadFactory& factory) const = 0; +/// Layer* Clone(Graph& graph) const = 0; class ElementwiseBaseLayer : public Layer { public: + /// Check if the input tensor shape(s) + /// will lead to a valid configuration of the element wise operation. 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; protected: + /// @param numInputSlots The number of input slots for the layer. + /// @param numOutputSlots The number of output slots for the layer. + /// @param type The layer type. + /// @param name Optional name for the layer. ElementwiseBaseLayer(unsigned int numInputSlots, unsigned int numOutputSlots, LayerType type, const char* name); + + /// Default destructor ~ElementwiseBaseLayer() = default; }; |