ArmNN
 22.05.01
TestDepthwiseConvolution2dLayerVisitor Class Reference

#include <ConstTensorLayerVisitor.hpp>

Inheritance diagram for TestDepthwiseConvolution2dLayerVisitor:
TestLayerVisitor StrategyBase< NoThrowStrategy > IStrategy

Public Member Functions

 TestDepthwiseConvolution2dLayerVisitor (const DepthwiseConvolution2dDescriptor &descriptor, const char *name=nullptr)
 
virtual ~TestDepthwiseConvolution2dLayerVisitor ()
 
void ExecuteStrategy (const armnn::IConnectableLayer *layer, const armnn::BaseDescriptor &descriptor, const std::vector< armnn::ConstTensor > &constants, const char *name, const armnn::LayerBindingId id=0) override
 
- Public Member Functions inherited from TestLayerVisitor
 TestLayerVisitor (const char *name)
 
- Public Member Functions inherited from IStrategy
virtual void FinishStrategy ()
 

Protected Member Functions

void CheckDescriptor (const DepthwiseConvolution2dDescriptor &convolution2dDescriptor)
 
- Protected Member Functions inherited from TestLayerVisitor
virtual ~TestLayerVisitor ()
 
void CheckLayerName (const char *name)
 
void CheckLayerPointer (const IConnectableLayer *layer)
 
void CheckConstTensors (const ConstTensor &expected, const ConstTensor &actual)
 
void CheckConstTensors (const ConstTensor &expected, const ConstTensorHandle &actual)
 
void CheckConstTensorPtrs (const std::string &name, const ConstTensor *expected, const ConstTensor *actual)
 
void CheckConstTensorPtrs (const std::string &name, const ConstTensor *expected, const std::shared_ptr< ConstTensorHandle > actual)
 
void CheckOptionalConstTensors (const Optional< ConstTensor > &expected, const Optional< ConstTensor > &actual)
 
- Protected Member Functions inherited from StrategyBase< NoThrowStrategy >
virtual ~StrategyBase ()
 
- Protected Member Functions inherited from IStrategy
 IStrategy ()
 
virtual ~IStrategy ()
 

Additional Inherited Members

- Protected Attributes inherited from StrategyBase< NoThrowStrategy >
NoThrowStrategy m_DefaultStrategy
 

Detailed Description

Definition at line 61 of file ConstTensorLayerVisitor.hpp.

Constructor & Destructor Documentation

◆ TestDepthwiseConvolution2dLayerVisitor()

TestDepthwiseConvolution2dLayerVisitor ( const DepthwiseConvolution2dDescriptor descriptor,
const char *  name = nullptr 
)
inlineexplicit

Definition at line 64 of file ConstTensorLayerVisitor.hpp.

66  : TestLayerVisitor(name)
67  , m_Descriptor(descriptor)
68  {}
TestLayerVisitor(const char *name)

◆ ~TestDepthwiseConvolution2dLayerVisitor()

virtual ~TestDepthwiseConvolution2dLayerVisitor ( )
inlinevirtual

Definition at line 70 of file ConstTensorLayerVisitor.hpp.

70 {}

Member Function Documentation

◆ CheckDescriptor()

void CheckDescriptor ( const DepthwiseConvolution2dDescriptor convolution2dDescriptor)
protected

Definition at line 26 of file ConstTensorLayerVisitor.cpp.

References Convolution2dDescriptor::m_BiasEnabled, DepthwiseConvolution2dDescriptor::m_BiasEnabled, Convolution2dDescriptor::m_DataLayout, DepthwiseConvolution2dDescriptor::m_DataLayout, Convolution2dDescriptor::m_PadBottom, DepthwiseConvolution2dDescriptor::m_PadBottom, Convolution2dDescriptor::m_PadLeft, DepthwiseConvolution2dDescriptor::m_PadLeft, Convolution2dDescriptor::m_PadRight, DepthwiseConvolution2dDescriptor::m_PadRight, Convolution2dDescriptor::m_PadTop, DepthwiseConvolution2dDescriptor::m_PadTop, Convolution2dDescriptor::m_StrideX, DepthwiseConvolution2dDescriptor::m_StrideX, Convolution2dDescriptor::m_StrideY, and DepthwiseConvolution2dDescriptor::m_StrideY.

28 {
29  CHECK(m_Descriptor.m_PadLeft == convolution2dDescriptor.m_PadLeft);
30  CHECK(m_Descriptor.m_PadRight == convolution2dDescriptor.m_PadRight);
31  CHECK(m_Descriptor.m_PadTop == convolution2dDescriptor.m_PadTop);
32  CHECK(m_Descriptor.m_PadBottom == convolution2dDescriptor.m_PadBottom);
33  CHECK(m_Descriptor.m_StrideX == convolution2dDescriptor.m_StrideX);
34  CHECK(m_Descriptor.m_StrideY == convolution2dDescriptor.m_StrideY);
35  CHECK(m_Descriptor.m_BiasEnabled == convolution2dDescriptor.m_BiasEnabled);
36  CHECK(m_Descriptor.m_DataLayout == convolution2dDescriptor.m_DataLayout);
37 }
bool m_BiasEnabled
Enable/disable bias.
uint32_t m_PadBottom
Padding bottom value in the height dimension.
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_PadTop
Padding top value in the height 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.

◆ ExecuteStrategy()

void ExecuteStrategy ( const armnn::IConnectableLayer layer,
const armnn::BaseDescriptor descriptor,
const std::vector< armnn::ConstTensor > &  constants,
const char *  name,
const armnn::LayerBindingId  id = 0 
)
inlineoverridevirtual

Reimplemented from StrategyBase< NoThrowStrategy >.

Definition at line 72 of file ConstTensorLayerVisitor.hpp.

References NoThrowStrategy::Apply(), TestConvolution2dLayerVisitor::CheckDescriptor(), TestLayerVisitor::CheckLayerName(), TestLayerVisitor::CheckLayerPointer(), armnn::DepthwiseConvolution2d, armnn::GetLayerTypeAsCString(), IConnectableLayer::GetType(), armnn::IgnoreUnused(), and StrategyBase< NoThrowStrategy >::m_DefaultStrategy.

77  {
78  armnn::IgnoreUnused(descriptor, constants, id);
79  switch (layer->GetType())
80  {
82  {
83  CheckLayerPointer(layer);
84  CheckLayerName(name);
85  CheckDescriptor(static_cast<const armnn::DepthwiseConvolution2dDescriptor&>(descriptor));
86  break;
87  }
88  default:
89  {
91  }
92  }
93  }
void CheckLayerName(const char *name)
void CheckLayerPointer(const IConnectableLayer *layer)
void IgnoreUnused(Ts &&...)
void Apply(const std::string &)
void CheckDescriptor(const DepthwiseConvolution2dDescriptor &convolution2dDescriptor)
virtual LayerType GetType() const =0
Returns the armnn::LayerType of this layer.
const char * GetLayerTypeAsCString(LayerType type)

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