ArmNN
 22.05
TestFullyConnectedLayerVistor Class Reference

#include <ConstTensorLayerVisitor.hpp>

Inheritance diagram for TestFullyConnectedLayerVistor:
TestLayerVisitor StrategyBase< NoThrowStrategy > IStrategy

Public Member Functions

 TestFullyConnectedLayerVistor (const FullyConnectedDescriptor &descriptor, const char *name=nullptr)
 
virtual ~TestFullyConnectedLayerVistor ()
 
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 FullyConnectedDescriptor &descriptor)
 
- 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 102 of file ConstTensorLayerVisitor.hpp.

Constructor & Destructor Documentation

◆ TestFullyConnectedLayerVistor()

TestFullyConnectedLayerVistor ( const FullyConnectedDescriptor descriptor,
const char *  name = nullptr 
)
inlineexplicit

Definition at line 105 of file ConstTensorLayerVisitor.hpp.

107  : TestLayerVisitor(name)
108  , m_Descriptor(descriptor)
109  {}
TestLayerVisitor(const char *name)

◆ ~TestFullyConnectedLayerVistor()

virtual ~TestFullyConnectedLayerVistor ( )
inlinevirtual

Definition at line 111 of file ConstTensorLayerVisitor.hpp.

111 {}

Member Function Documentation

◆ CheckDescriptor()

void CheckDescriptor ( const FullyConnectedDescriptor descriptor)
protected

Definition at line 39 of file ConstTensorLayerVisitor.cpp.

References FullyConnectedDescriptor::m_BiasEnabled, Convolution2dDescriptor::m_BiasEnabled, and FullyConnectedDescriptor::m_TransposeWeightMatrix.

40 {
41  CHECK(m_Descriptor.m_BiasEnabled == descriptor.m_BiasEnabled);
42  CHECK(m_Descriptor.m_TransposeWeightMatrix == descriptor.m_TransposeWeightMatrix);
43 }
bool m_TransposeWeightMatrix
Enable/disable transpose weight matrix.
bool m_BiasEnabled
Enable/disable bias.

◆ 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 113 of file ConstTensorLayerVisitor.hpp.

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

118  {
119  armnn::IgnoreUnused(descriptor, constants, id);
120  switch (layer->GetType())
121  {
123  {
124  CheckLayerPointer(layer);
125  CheckLayerName(name);
126  CheckDescriptor(static_cast<const armnn::FullyConnectedDescriptor&>(descriptor));
127  break;
128  }
129  default:
130  {
132  }
133  }
134  }
void CheckLayerName(const char *name)
void CheckDescriptor(const FullyConnectedDescriptor &descriptor)
void CheckLayerPointer(const IConnectableLayer *layer)
void IgnoreUnused(Ts &&...)
void Apply(const std::string &)
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: