ArmNN
 22.05.01
TransposeConvolution2dLayer Class Reference

This layer represents a 2D transpose convolution operation. More...

#include <TransposeConvolution2dLayer.hpp>

Inheritance diagram for TransposeConvolution2dLayer:
LayerWithParameters< TransposeConvolution2dDescriptor > Layer IConnectableLayer

Public Member Functions

virtual std::unique_ptr< IWorkloadCreateWorkload (const IWorkloadFactory &factory) const override
 Makes a workload for the TransposeConvolution2d type. More...
 
TransposeConvolution2dLayerClone (Graph &graph) const override
 Creates a dynamically-allocated copy of this layer. More...
 
void ValidateTensorShapesFromInputs () override
 Check if the input tensor shape(s) will lead to a valid configuration of TransposeConvolution2dLayer. More...
 
std::vector< TensorShapeInferOutputShapes (const std::vector< TensorShape > &inputShapes) const override
 Infers the output shapes from given input shapes and layer properties. More...
 
ARMNN_NO_DEPRECATE_WARN_BEGIN void Accept (ILayerVisitor &visitor) const override
 
ARMNN_NO_DEPRECATE_WARN_END void ExecuteStrategy (IStrategy &strategy) const override
 Apply a visitor to this layer. More...
 
- Public Member Functions inherited from LayerWithParameters< TransposeConvolution2dDescriptor >
const TransposeConvolution2dDescriptorGetParameters () const override
 If the layer has a descriptor return it. More...
 
void SerializeLayerParameters (ParameterStringifyFunction &fn) const override
 Helper to serialize the layer parameters to string (currently used in DotSerializer and company). More...
 
- Public Member Functions inherited from Layer
 Layer (unsigned int numInputSlots, unsigned int numOutputSlots, LayerType type, const char *name)
 
 Layer (unsigned int numInputSlots, unsigned int numOutputSlots, LayerType type, DataLayout layout, const char *name)
 
const std::string & GetNameStr () const
 
const OutputHandlerGetOutputHandler (unsigned int i=0) const
 
OutputHandlerGetOutputHandler (unsigned int i=0)
 
ShapeInferenceMethod GetShapeInferenceMethod () const
 
bool GetAllowExpandedDims () const
 
const std::vector< InputSlot > & GetInputSlots () const
 
const std::vector< OutputSlot > & GetOutputSlots () const
 
std::vector< InputSlot >::iterator BeginInputSlots ()
 
std::vector< InputSlot >::iterator EndInputSlots ()
 
std::vector< OutputSlot >::iterator BeginOutputSlots ()
 
std::vector< OutputSlot >::iterator EndOutputSlots ()
 
bool IsOutputUnconnected ()
 
void ResetPriority () const
 
LayerPriority GetPriority () const
 
LayerType GetType () const override
 Returns the armnn::LayerType of this layer. More...
 
DataType GetDataType () const
 
const BackendIdGetBackendId () const
 
void SetBackendId (const BackendId &id)
 
virtual void CreateTensorHandles (const TensorHandleFactoryRegistry &registry, const IWorkloadFactory &factory, const bool IsMemoryManaged=true)
 
void VerifyLayerConnections (unsigned int expectedConnections, const CheckLocation &location) const
 
virtual void ReleaseConstantData ()
 
template<typename Op >
void OperateOnConstantTensors (Op op)
 
const char * GetName () const override
 Returns the name of the layer. More...
 
unsigned int GetNumInputSlots () const override
 Returns the number of connectable input slots. More...
 
unsigned int GetNumOutputSlots () const override
 Returns the number of connectable output slots. More...
 
const InputSlotGetInputSlot (unsigned int index) const override
 Get a const input slot handle by slot index. More...
 
InputSlotGetInputSlot (unsigned int index) override
 Get the input slot handle by slot index. More...
 
const OutputSlotGetOutputSlot (unsigned int index=0) const override
 Get the const output slot handle by slot index. More...
 
OutputSlotGetOutputSlot (unsigned int index=0) override
 Get the output slot handle by slot index. More...
 
void SetGuid (LayerGuid guid)
 
LayerGuid GetGuid () const final
 Returns the unique id of the layer. More...
 
void AddRelatedLayerName (const std::string layerName)
 
const std::list< std::string > & GetRelatedLayerNames ()
 
virtual void Reparent (Graph &dest, std::list< Layer *>::const_iterator iterator)=0
 
void BackendSelectionHint (Optional< BackendId > backend) final
 Provide a hint for the optimizer as to which backend to prefer for this layer. More...
 
Optional< BackendIdGetBackendHint () const
 
void SetShapeInferenceMethod (ShapeInferenceMethod shapeInferenceMethod)
 
void SetAllowExpandedDims (bool allowExpandedDims)
 
template<typename T >
std::shared_ptr< T > GetAdditionalInformation () const
 
void SetAdditionalInfoForObject (const AdditionalInfoObjectPtr &additionalInfo)
 
- Public Member Functions inherited from IConnectableLayer
ARMNN_NO_DEPRECATE_WARN_BEGIN ARMNN_DEPRECATED_MSG_REMOVAL_DATE ("Accept is deprecated. The ILayerVisitor that works in conjunction with this " "Accept function is deprecated. Use IStrategy in combination with " "ExecuteStrategy instead, which is an ABI/API stable version of the " "visitor pattern.", "22.05") virtual void Accept(ILayerVisitor &visitor) const =0
 Apply a visitor to this layer. More...
 

Public Attributes

std::shared_ptr< ConstTensorHandlem_Weight
 A unique pointer to store weight values. More...
 
std::shared_ptr< ConstTensorHandlem_Bias
 A unique pointer to store bias values. More...
 

Protected Member Functions

 TransposeConvolution2dLayer (const TransposeConvolution2dDescriptor &param, const char *name)
 Constructor to create a TransposeConvolution2dLayer. More...
 
 ~TransposeConvolution2dLayer ()=default
 Default destructor. More...
 
ConstantTensors GetConstantTensorsByRef () override
 Retrieve the handles to the constant values stored by the layer. More...
 
- Protected Member Functions inherited from LayerWithParameters< TransposeConvolution2dDescriptor >
 LayerWithParameters (unsigned int numInputSlots, unsigned int numOutputSlots, LayerType type, const TransposeConvolution2dDescriptor &param, const char *name)
 
 ~LayerWithParameters ()=default
 
WorkloadInfo PrepInfoAndDesc (QueueDescriptor &descriptor) const
 Helper function to reduce duplication in *LayerCreateWorkload. More...
 
void ExecuteStrategy (IStrategy &strategy) const override
 Apply a visitor to this layer. More...
 
- Protected Member Functions inherited from Layer
virtual ~Layer ()=default
 
template<typename QueueDescriptor >
void CollectQueueDescriptorInputs (QueueDescriptor &descriptor, WorkloadInfo &info) const
 
template<typename QueueDescriptor >
void CollectQueueDescriptorOutputs (QueueDescriptor &descriptor, WorkloadInfo &info) const
 
void ValidateAndCopyShape (const TensorShape &outputShape, const TensorShape &inferredShape, const ShapeInferenceMethod shapeInferenceMethod, const std::string &layerName, const unsigned int outputSlotIndex=0)
 
void VerifyShapeInferenceType (const TensorShape &outputShape, ShapeInferenceMethod shapeInferenceMethod)
 
template<typename QueueDescriptor >
WorkloadInfo PrepInfoAndDesc (QueueDescriptor &descriptor) const
 Helper function to reduce duplication in *LayerCreateWorkload. More...
 
template<typename LayerType , typename ... Params>
LayerTypeCloneBase (Graph &graph, Params &&... params) const
 
void SetAdditionalInfo (QueueDescriptor &descriptor) const
 
- Protected Member Functions inherited from IConnectableLayer
 ~IConnectableLayer ()
 Objects are not deletable via the handle. More...
 

Additional Inherited Members

- Public Types inherited from LayerWithParameters< TransposeConvolution2dDescriptor >
using DescriptorType = TransposeConvolution2dDescriptor
 
- Public Types inherited from IConnectableLayer
using ConstantTensors = std::vector< std::reference_wrapper< std::shared_ptr< ConstTensorHandle > >>
 
- Protected Attributes inherited from LayerWithParameters< TransposeConvolution2dDescriptor >
TransposeConvolution2dDescriptor m_Param
 The parameters for the layer (not including tensor-valued weights etc.). More...
 
- Protected Attributes inherited from Layer
AdditionalInfoObjectPtr m_AdditionalInfoObject
 
std::vector< OutputHandlerm_OutputHandlers
 
ShapeInferenceMethod m_ShapeInferenceMethod
 

Detailed Description

This layer represents a 2D transpose convolution operation.

Definition at line 15 of file TransposeConvolution2dLayer.hpp.

Constructor & Destructor Documentation

◆ TransposeConvolution2dLayer()

TransposeConvolution2dLayer ( const TransposeConvolution2dDescriptor param,
const char *  name 
)
protected

Constructor to create a TransposeConvolution2dLayer.

Parameters
[in]paramTransposeConvolution2dDescriptor to configure the 2D transpose convolution operation.
[in]nameOptional name for the layer.

Definition at line 19 of file TransposeConvolution2dLayer.cpp.

References armnn::TransposeConvolution2d.

22 {
23 }
LayerWithParameters(unsigned int numInputSlots, unsigned int numOutputSlots, LayerType type, const TransposeConvolution2dDescriptor &param, const char *name)

◆ ~TransposeConvolution2dLayer()

~TransposeConvolution2dLayer ( )
protecteddefault

Default destructor.

Member Function Documentation

◆ Accept()

ARMNN_NO_DEPRECATE_WARN_BEGIN void Accept ( ILayerVisitor &  visitor) const
override

Definition at line 126 of file TransposeConvolution2dLayer.cpp.

References ARMNN_NO_DEPRECATE_WARN_END, Layer::GetName(), LayerWithParameters< TransposeConvolution2dDescriptor >::GetParameters(), ManagedConstTensorHandle::GetTensorInfo(), TransposeConvolution2dLayer::m_Bias, TransposeConvolution2dLayer::m_Weight, and ManagedConstTensorHandle::Map().

127 {
128  ManagedConstTensorHandle managedWeight(m_Weight);
129  ConstTensor weightsTensor(managedWeight.GetTensorInfo(), managedWeight.Map());
130 
131  Optional<ConstTensor> optionalBiasTensor = EmptyOptional();
132  ManagedConstTensorHandle managedBias(m_Bias);
133  if (GetParameters().m_BiasEnabled)
134  {
135  ConstTensor biasTensor(managedBias.GetTensorInfo(), managedBias.Map());
136  optionalBiasTensor = Optional<ConstTensor>(biasTensor);
137  }
138 
139  visitor.VisitTransposeConvolution2dLayer(this, GetParameters(), weightsTensor, optionalBiasTensor, GetName());
140 }
const TransposeConvolution2dDescriptor & GetParameters() const override
std::shared_ptr< ConstTensorHandle > m_Bias
A unique pointer to store bias values.
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
Definition: Tensor.hpp:327
EmptyOptional is used to initialize the Optional class in case we want to have default value for an O...
Definition: Optional.hpp:32
const char * GetName() const override
Returns the name of the layer.
Definition: Layer.hpp:317
std::shared_ptr< ConstTensorHandle > m_Weight
A unique pointer to store weight values.

◆ Clone()

TransposeConvolution2dLayer * Clone ( Graph graph) const
overridevirtual

Creates a dynamically-allocated copy of this layer.

Parameters
[in]graphThe graph into which this layer is being cloned.

Implements Layer.

Definition at line 43 of file TransposeConvolution2dLayer.cpp.

References Layer::GetName(), TransposeConvolution2dLayer::m_Bias, LayerWithParameters< TransposeConvolution2dDescriptor >::m_Param, and TransposeConvolution2dLayer::m_Weight.

44 {
45  auto layer = CloneBase<TransposeConvolution2dLayer>(graph, m_Param, GetName());
46 
47  layer->m_Weight = m_Weight ? m_Weight : nullptr;
48 
49  if (layer->m_Param.m_BiasEnabled)
50  {
51  layer->m_Bias = m_Bias ? m_Bias : nullptr;
52  }
53 
54  return std::move(layer);
55 }
TransposeConvolution2dDescriptor m_Param
The parameters for the layer (not including tensor-valued weights etc.).
std::shared_ptr< ConstTensorHandle > m_Bias
A unique pointer to store bias values.
const char * GetName() const override
Returns the name of the layer.
Definition: Layer.hpp:317
std::shared_ptr< ConstTensorHandle > m_Weight
A unique pointer to store weight values.

◆ CreateWorkload()

std::unique_ptr< IWorkload > CreateWorkload ( const IWorkloadFactory factory) const
overridevirtual

Makes a workload for the TransposeConvolution2d type.

Parameters
[in]graphThe graph where this layer can be found.
[in]factoryThe workload factory which will create the workload.
Returns
A pointer to the created workload, or nullptr if not created.

Implements Layer.

Definition at line 25 of file TransposeConvolution2dLayer.cpp.

References ARMNN_ASSERT_MSG, IWorkloadFactory::CreateWorkload(), TransposeConvolution2dLayer::m_Bias, TransposeConvolution2dQueueDescriptor::m_Bias, TransposeConvolution2dDescriptor::m_BiasEnabled, LayerWithParameters< TransposeConvolution2dDescriptor >::m_Param, TransposeConvolution2dLayer::m_Weight, TransposeConvolution2dQueueDescriptor::m_Weight, LayerWithParameters< TransposeConvolution2dDescriptor >::PrepInfoAndDesc(), Layer::SetAdditionalInfo(), and armnn::TransposeConvolution2d.

26 {
27  ARMNN_ASSERT_MSG(m_Weight != nullptr, "TransposeConvolution2dLayer: Weights data should not be null.");
28 
30  descriptor.m_Weight = m_Weight.get();
31 
33  {
34  ARMNN_ASSERT_MSG(m_Bias != nullptr, "TransposeConvolution2dLayer: Bias data should not be null.");
35  descriptor.m_Bias = m_Bias.get();
36  }
37 
38  SetAdditionalInfo(descriptor);
39 
40  return factory.CreateWorkload(LayerType::TransposeConvolution2d, descriptor, PrepInfoAndDesc(descriptor));
41 }
TransposeConvolution2dDescriptor m_Param
The parameters for the layer (not including tensor-valued weights etc.).
bool m_BiasEnabled
Enable/disable bias.
#define ARMNN_ASSERT_MSG(COND, MSG)
Definition: Assert.hpp:15
std::shared_ptr< ConstTensorHandle > m_Bias
A unique pointer to store bias values.
void SetAdditionalInfo(QueueDescriptor &descriptor) const
Definition: Layer.cpp:274
WorkloadInfo PrepInfoAndDesc(QueueDescriptor &descriptor) const
Helper function to reduce duplication in *LayerCreateWorkload.
virtual std::unique_ptr< IWorkload > CreateWorkload(LayerType type, const QueueDescriptor &descriptor, const WorkloadInfo &info) const
std::shared_ptr< ConstTensorHandle > m_Weight
A unique pointer to store weight values.

◆ ExecuteStrategy()

ARMNN_NO_DEPRECATE_WARN_END void ExecuteStrategy ( IStrategy strategy) const
overridevirtual

Apply a visitor to this layer.

Reimplemented from Layer.

Definition at line 143 of file TransposeConvolution2dLayer.cpp.

References IStrategy::ExecuteStrategy(), Layer::GetName(), LayerWithParameters< TransposeConvolution2dDescriptor >::GetParameters(), ManagedConstTensorHandle::GetTensorInfo(), TransposeConvolution2dLayer::m_Bias, TransposeConvolution2dLayer::m_Weight, and ManagedConstTensorHandle::Map().

144 {
145  ManagedConstTensorHandle managedWeight(m_Weight);
146  std::vector<armnn::ConstTensor> constTensors { { managedWeight.GetTensorInfo(), managedWeight.Map() } };
147 
148  ManagedConstTensorHandle managedBias(m_Bias);
149  if (GetParameters().m_BiasEnabled)
150  {
151  constTensors.emplace_back(ConstTensor(managedBias.GetTensorInfo(), managedBias.Map()));
152  }
153 
154  strategy.ExecuteStrategy(this, GetParameters(), constTensors, GetName());
155 }
virtual void ExecuteStrategy(const armnn::IConnectableLayer *layer, const armnn::BaseDescriptor &descriptor, const std::vector< armnn::ConstTensor > &constants, const char *name, const armnn::LayerBindingId id=0)=0
const TransposeConvolution2dDescriptor & GetParameters() const override
std::shared_ptr< ConstTensorHandle > m_Bias
A unique pointer to store bias values.
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
Definition: Tensor.hpp:327
const char * GetName() const override
Returns the name of the layer.
Definition: Layer.hpp:317
std::shared_ptr< ConstTensorHandle > m_Weight
A unique pointer to store weight values.

◆ GetConstantTensorsByRef()

Layer::ConstantTensors GetConstantTensorsByRef ( )
overrideprotectedvirtual

Retrieve the handles to the constant values stored by the layer.

Returns
A vector of the constant tensors stored by this layer.

Reimplemented from Layer.

Definition at line 119 of file TransposeConvolution2dLayer.cpp.

References ARMNN_NO_DEPRECATE_WARN_BEGIN, TransposeConvolution2dLayer::m_Bias, and TransposeConvolution2dLayer::m_Weight.

120 {
121  // For API stability DO NOT ALTER order and add new members to the end of vector
122  return {m_Weight, m_Bias};
123 }
std::shared_ptr< ConstTensorHandle > m_Bias
A unique pointer to store bias values.
std::shared_ptr< ConstTensorHandle > m_Weight
A unique pointer to store weight values.

◆ InferOutputShapes()

std::vector< TensorShape > InferOutputShapes ( const std::vector< TensorShape > &  inputShapes) const
overridevirtual

Infers the output shapes from given input shapes and layer properties.

Parameters
[in]inputShapesThe input shapes the layer has.
Returns
A vector of the inferred output shape.

Reimplemented from Layer.

Definition at line 57 of file TransposeConvolution2dLayer.cpp.

References ARMNN_ASSERT, ARMNN_ASSERT_MSG, TransposeConvolution2dDescriptor::m_DataLayout, TransposeConvolution2dDescriptor::m_PadBottom, TransposeConvolution2dDescriptor::m_PadLeft, TransposeConvolution2dDescriptor::m_PadRight, TransposeConvolution2dDescriptor::m_PadTop, LayerWithParameters< TransposeConvolution2dDescriptor >::m_Param, TransposeConvolution2dDescriptor::m_StrideX, TransposeConvolution2dDescriptor::m_StrideY, and armnn::NHWC.

Referenced by TransposeConvolution2dInferOutputShapeTest(), and TransposeConvolution2dLayer::ValidateTensorShapesFromInputs().

59 {
60  ARMNN_ASSERT(inputShapes.size() == 2);
61  const TensorShape& inputShape = inputShapes[0];
62  const TensorShape& kernelShape = inputShapes[1];
63 
64  ARMNN_ASSERT_MSG(inputShape.GetNumDimensions() == 4, "Transpose convolutions will always have 4D input");
65 
66  DataLayoutIndexed dataLayoutIndex(m_Param.m_DataLayout);
67 
68  const unsigned int batches = inputShape[0];
69 
70  const unsigned int wInput = inputShape[dataLayoutIndex.GetWidthIndex()];
71  const unsigned int hInput = inputShape[dataLayoutIndex.GetHeightIndex()];
72 
73  const unsigned int wKernel = kernelShape[dataLayoutIndex.GetWidthIndex()];
74  const unsigned int hKernel = kernelShape[dataLayoutIndex.GetHeightIndex()];
75 
76  unsigned int wPadding = m_Param.m_PadLeft + m_Param.m_PadRight;
77  unsigned int hPadding = m_Param.m_PadTop + m_Param.m_PadBottom;
78 
79  unsigned int wOutput = (wInput - 1) * m_Param.m_StrideX + wKernel - wPadding;
80  unsigned int hOutput = (hInput - 1) * m_Param.m_StrideY + hKernel - hPadding;
81  unsigned int cOutput = kernelShape[0];
82 
84  TensorShape( { batches, hOutput, wOutput, cOutput } ) :
85  TensorShape( { batches, cOutput, hOutput, wOutput });
86 
87  return std::vector<TensorShape>({ tensorShape });
88 }
TransposeConvolution2dDescriptor m_Param
The parameters for the layer (not including tensor-valued weights etc.).
uint32_t m_PadBottom
Padding bottom value in the height dimension.
#define ARMNN_ASSERT_MSG(COND, MSG)
Definition: Assert.hpp:15
Provides access to the appropriate indexes for Channels, Height and Width based on DataLayout...
uint32_t m_PadTop
Padding top value in the height dimension.
#define ARMNN_ASSERT(COND)
Definition: Assert.hpp:14
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
uint32_t m_PadLeft
Padding left value in the width dimension.
uint32_t m_StrideX
Stride value when proceeding through input for the width dimension.
uint32_t m_StrideY
Stride value when proceeding through input for the height dimension.
uint32_t m_PadRight
Padding right value in the width dimension.

◆ ValidateTensorShapesFromInputs()

void ValidateTensorShapesFromInputs ( )
overridevirtual

Check if the input tensor shape(s) will lead to a valid configuration of TransposeConvolution2dLayer.

Parameters
[in]shapeInferenceMethodIndicates if output shape shall be overwritten or just validated.

Implements Layer.

Definition at line 90 of file TransposeConvolution2dLayer.cpp.

References ARMNN_ASSERT, ARMNN_ASSERT_MSG, CHECK_LOCATION, InputSlot::GetConnection(), Layer::GetInputSlot(), Layer::GetOutputSlot(), TensorInfo::GetShape(), IOutputSlot::GetTensorInfo(), OutputSlot::GetTensorInfo(), TransposeConvolution2dLayer::InferOutputShapes(), TransposeConvolution2dDescriptor::m_OutputShape, TransposeConvolution2dDescriptor::m_OutputShapeEnabled, LayerWithParameters< TransposeConvolution2dDescriptor >::m_Param, Layer::m_ShapeInferenceMethod, TransposeConvolution2dLayer::m_Weight, Layer::ValidateAndCopyShape(), Layer::VerifyLayerConnections(), and Layer::VerifyShapeInferenceType().

91 {
93 
94  const TensorShape& outputShape = GetOutputSlot(0).GetTensorInfo().GetShape();
95 
97 
98  ARMNN_ASSERT_MSG(m_Weight != nullptr, "TransposeConvolution2dLayer: Weight data cannot be null.");
99 
100  std::vector<TensorShape> expectedOutputShape;
101  // If output_shape was specified then use it rather than calculate an inferred output shape.
103  {
104  TensorShape shapeAsTensorShape(static_cast<unsigned int>(m_Param.m_OutputShape.size()),
105  m_Param.m_OutputShape.data());
106  expectedOutputShape.push_back(shapeAsTensorShape);
107  }
108  else
109  {
110  expectedOutputShape = InferOutputShapes({GetInputSlot(0).GetConnection()->GetTensorInfo().GetShape(),
111  m_Weight->GetTensorInfo().GetShape() });
112  }
113 
114  ARMNN_ASSERT(expectedOutputShape.size() == 1);
115 
116  ValidateAndCopyShape(outputShape, expectedOutputShape[0], m_ShapeInferenceMethod, "TransposeConvolution2dLayer");
117 }
TransposeConvolution2dDescriptor m_Param
The parameters for the layer (not including tensor-valued weights etc.).
const TensorShape & GetShape() const
Definition: Tensor.hpp:191
std::vector< unsigned int > m_OutputShape
bool m_OutputShapeEnabled
Output shape if it has been specified.
void VerifyShapeInferenceType(const TensorShape &outputShape, ShapeInferenceMethod shapeInferenceMethod)
Definition: Layer.cpp:491
const IOutputSlot * GetConnection() const override
Definition: Layer.hpp:204
void ValidateAndCopyShape(const TensorShape &outputShape, const TensorShape &inferredShape, const ShapeInferenceMethod shapeInferenceMethod, const std::string &layerName, const unsigned int outputSlotIndex=0)
Definition: Layer.cpp:422
void VerifyLayerConnections(unsigned int expectedConnections, const CheckLocation &location) const
Definition: Layer.cpp:378
const InputSlot & GetInputSlot(unsigned int index) const override
Get a const input slot handle by slot index.
Definition: Layer.hpp:322
#define ARMNN_ASSERT_MSG(COND, MSG)
Definition: Assert.hpp:15
#define ARMNN_ASSERT(COND)
Definition: Assert.hpp:14
#define CHECK_LOCATION()
Definition: Exceptions.hpp:203
const OutputSlot & GetOutputSlot(unsigned int index=0) const override
Get the const output slot handle by slot index.
Definition: Layer.hpp:324
virtual const TensorInfo & GetTensorInfo() const =0
std::vector< TensorShape > InferOutputShapes(const std::vector< TensorShape > &inputShapes) const override
Infers the output shapes from given input shapes and layer properties.
const TensorInfo & GetTensorInfo() const override
Definition: Layer.cpp:92
std::shared_ptr< ConstTensorHandle > m_Weight
A unique pointer to store weight values.
ShapeInferenceMethod m_ShapeInferenceMethod
Definition: Layer.hpp:421

Member Data Documentation

◆ m_Bias

◆ m_Weight


The documentation for this class was generated from the following files: