ArmNN
 21.11
TestQLstmLayerVisitor Class Reference

#include <ConstTensorLayerVisitor.hpp>

Inheritance diagram for TestQLstmLayerVisitor:
LstmVisitor TestLayerVisitor StrategyBase< NoThrowStrategy > IStrategy

Public Member Functions

 TestQLstmLayerVisitor (const QLstmDescriptor &descriptor, const LstmInputParams &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 LstmVisitor
 LstmVisitor (const LstmInputParams &params, const char *name=nullptr)
 
- 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 QLstmDescriptor &descriptor)
 
- Protected Member Functions inherited from LstmVisitor
template<typename LayerType >
void CheckInputParameters (const LayerType *layer, const LstmInputParams &inputParams)
 
- 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 LstmVisitor
LstmInputParams m_InputParams
 
- Protected Attributes inherited from StrategyBase< NoThrowStrategy >
NoThrowStrategy m_DefaultStrategy
 

Detailed Description

Definition at line 386 of file ConstTensorLayerVisitor.hpp.

Constructor & Destructor Documentation

◆ TestQLstmLayerVisitor()

TestQLstmLayerVisitor ( const QLstmDescriptor descriptor,
const LstmInputParams params,
const char *  name = nullptr 
)
inlineexplicit

Definition at line 389 of file ConstTensorLayerVisitor.hpp.

392  : LstmVisitor(params, name)
393  , m_Descriptor(descriptor)
394  {}
LstmVisitor(const LstmInputParams &params, const char *name=nullptr)

Member Function Documentation

◆ CheckDescriptor()

void CheckDescriptor ( const QLstmDescriptor descriptor)
protected

Definition at line 61 of file ConstTensorLayerVisitor.cpp.

References QLstmDescriptor::m_CellClip, QLstmDescriptor::m_CifgEnabled, QLstmDescriptor::m_PeepholeEnabled, QLstmDescriptor::m_ProjectionClip, and QLstmDescriptor::m_ProjectionEnabled.

62 {
63  CHECK(m_Descriptor.m_CellClip == descriptor.m_CellClip);
64  CHECK(m_Descriptor.m_ProjectionClip == descriptor.m_ProjectionClip);
65  CHECK(m_Descriptor.m_CifgEnabled == descriptor.m_CifgEnabled);
66  CHECK(m_Descriptor.m_PeepholeEnabled == descriptor.m_PeepholeEnabled);
67  CHECK(m_Descriptor.m_ProjectionEnabled == descriptor.m_ProjectionEnabled);
68 }
bool m_PeepholeEnabled
Enable/disable peephole.
float m_ProjectionClip
Clipping threshold value for the projection.
float m_CellClip
Clipping threshold value for the cell state.
bool m_ProjectionEnabled
Enable/disable the projection layer.
bool m_CifgEnabled
Enable/disable CIFG (coupled input & forget gate).

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

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

401  {
402  armnn::IgnoreUnused(descriptor, constants, id);
403  switch (layer->GetType())
404  {
406  {
407  CheckLayerPointer(layer);
408  CheckLayerName(name);
409  CheckDescriptor(static_cast<const armnn::QLstmDescriptor&>(descriptor));
410  CheckInputParameters<const QLstmLayer>(PolymorphicDowncast<const QLstmLayer*>(layer), m_InputParams);
411  break;
412  }
413  default:
414  {
416  }
417  }
418  }
void CheckDescriptor(const QLstmDescriptor &descriptor)
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.
const char * GetLayerTypeAsCString(LayerType type)

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