ArmNN  NotReleased
Convolution2dLayer.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
8 
9 namespace armnn
10 {
11 
12 class ScopedCpuTensorHandle;
13 
15 class Convolution2dLayer : public LayerWithParameters<Convolution2dDescriptor>
16 {
17 public:
18 
20  std::unique_ptr<ScopedCpuTensorHandle> m_Weight;
22  std::unique_ptr<ScopedCpuTensorHandle> m_Bias;
23 
28  virtual std::unique_ptr<IWorkload> CreateWorkload(const IWorkloadFactory& factory) const override;
29 
32  Convolution2dLayer* Clone(Graph& graph) const override;
33 
36  void ValidateTensorShapesFromInputs() override;
37 
42  std::vector<TensorShape> InferOutputShapes(const std::vector<TensorShape>& inputShapes) const override;
43 
44  void Accept(ILayerVisitor& visitor) const override;
45 
47 
48 protected:
52  Convolution2dLayer(const Convolution2dDescriptor& param, const char* name);
53 
55  ~Convolution2dLayer() = default;
56 
60 };
61 
62 } // namespace
ConstantTensors GetConstantTensorsByRef() override
void Accept(ILayerVisitor &visitor) const override
void SerializeLayerParameters(ParameterStringifyFunction &fn) const override
std::unique_ptr< ScopedCpuTensorHandle > m_Bias
A unique pointer to store Bias values.
This layer represents a convolution 2d operation.
std::unique_ptr< ScopedCpuTensorHandle > m_Weight
A unique pointer to store Weight values.
void ValidateTensorShapesFromInputs() override
~Convolution2dLayer()=default
Default destructor.
std::vector< std::reference_wrapper< std::unique_ptr< ScopedCpuTensorHandle > >> ConstantTensors
Definition: Layer.hpp:356
Convolution2dLayer * Clone(Graph &graph) const override
std::function< void(const std::string &name, const std::string &value)> ParameterStringifyFunction
Convolution2dLayer(const Convolution2dDescriptor &param, const char *name)
virtual std::unique_ptr< IWorkload > CreateWorkload(const IWorkloadFactory &factory) const override
std::vector< TensorShape > InferOutputShapes(const std::vector< TensorShape > &inputShapes) const override
A Convolution2dDescriptor for the Convolution2dLayer.