ArmNN
 22.05.01
TestQuantizedLstmLayerVisitor Class Reference

#include <ConstTensorLayerVisitor.hpp>

Inheritance diagram for TestQuantizedLstmLayerVisitor:
TestLayerVisitor StrategyBase< NoThrowStrategy > IStrategy

Public Member Functions

 TestQuantizedLstmLayerVisitor (const QuantizedLstmInputParams &params, const char *name=nullptr)
 
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 CheckInputParameters (const QuantizedLstmInputParams &params)
 
- 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 404 of file ConstTensorLayerVisitor.hpp.

Constructor & Destructor Documentation

◆ TestQuantizedLstmLayerVisitor()

TestQuantizedLstmLayerVisitor ( const QuantizedLstmInputParams params,
const char *  name = nullptr 
)
inlineexplicit

Definition at line 407 of file ConstTensorLayerVisitor.hpp.

409  : TestLayerVisitor(name)
410  , m_InputParams(params)
411  {}
TestLayerVisitor(const char *name)

Member Function Documentation

◆ CheckInputParameters()

void CheckInputParameters ( const QuantizedLstmInputParams params)
protected

Definition at line 70 of file ConstTensorLayerVisitor.cpp.

References TestLayerVisitor::CheckConstTensorPtrs(), QuantizedLstmInputParams::m_CellBias, QuantizedLstmInputParams::m_ForgetGateBias, QuantizedLstmInputParams::m_InputGateBias, QuantizedLstmInputParams::m_InputToCellWeights, QuantizedLstmInputParams::m_InputToForgetWeights, QuantizedLstmInputParams::m_InputToInputWeights, QuantizedLstmInputParams::m_InputToOutputWeights, QuantizedLstmInputParams::m_OutputGateBias, QuantizedLstmInputParams::m_RecurrentToCellWeights, QuantizedLstmInputParams::m_RecurrentToForgetWeights, QuantizedLstmInputParams::m_RecurrentToInputWeights, and QuantizedLstmInputParams::m_RecurrentToOutputWeights.

71 {
72  CheckConstTensorPtrs("InputToInputWeights",
73  m_InputParams.m_InputToInputWeights,
74  inputParams.m_InputToInputWeights);
75 
76  CheckConstTensorPtrs("InputToForgetWeights",
77  m_InputParams.m_InputToForgetWeights,
78  inputParams.m_InputToForgetWeights);
79 
80  CheckConstTensorPtrs("InputToCellWeights",
81  m_InputParams.m_InputToCellWeights,
82  inputParams.m_InputToCellWeights);
83 
84  CheckConstTensorPtrs("InputToOutputWeights",
85  m_InputParams.m_InputToOutputWeights,
86  inputParams.m_InputToOutputWeights);
87 
88  CheckConstTensorPtrs("RecurrentToInputWeights",
89  m_InputParams.m_RecurrentToInputWeights,
90  inputParams.m_RecurrentToInputWeights);
91 
92  CheckConstTensorPtrs("RecurrentToForgetWeights",
93  m_InputParams.m_RecurrentToForgetWeights,
94  inputParams.m_RecurrentToForgetWeights);
95 
96  CheckConstTensorPtrs("RecurrentToCellWeights",
97  m_InputParams.m_RecurrentToCellWeights,
98  inputParams.m_RecurrentToCellWeights);
99 
100  CheckConstTensorPtrs("RecurrentToOutputWeights",
101  m_InputParams.m_RecurrentToOutputWeights,
102  inputParams.m_RecurrentToOutputWeights);
103 
104  CheckConstTensorPtrs("InputGateBias", m_InputParams.m_InputGateBias, inputParams.m_InputGateBias);
105  CheckConstTensorPtrs("ForgetGateBias", m_InputParams.m_ForgetGateBias, inputParams.m_ForgetGateBias);
106  CheckConstTensorPtrs("CellBias", m_InputParams.m_CellBias, inputParams.m_CellBias);
107  CheckConstTensorPtrs("OutputGateBias", m_InputParams.m_OutputGateBias, inputParams.m_OutputGateBias);
108 }
const ConstTensor * m_RecurrentToOutputWeights
const ConstTensor * m_RecurrentToForgetWeights
const ConstTensor * m_InputToForgetWeights
const ConstTensor * m_RecurrentToInputWeights
void CheckConstTensorPtrs(const std::string &name, const ConstTensor *expected, const ConstTensor *actual)
const ConstTensor * m_RecurrentToCellWeights
const ConstTensor * m_InputToOutputWeights

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

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

418  {
419  armnn::IgnoreUnused(descriptor, constants, id);
420  switch (layer->GetType())
421  {
423  {
424  CheckLayerPointer(layer);
425  CheckLayerName(name);
426  CheckInputParameters(m_InputParams);
427  break;
428  }
429  default:
430  {
432  }
433  }
434  }
void CheckLayerName(const char *name)
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.
void CheckInputParameters(const QuantizedLstmInputParams &params)
const char * GetLayerTypeAsCString(LayerType type)

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