13 #include <boost/cast.hpp> 14 #include <boost/test/unit_test.hpp> 18 using namespace armnn;
35 layerDesc.
m_Eps = 0.05f;
39 layer->
m_Mean = std::make_unique<ScopedCpuTensorHandle>(weightInfo);
40 layer->
m_Variance = std::make_unique<ScopedCpuTensorHandle>(weightInfo);
41 layer->
m_Beta = std::make_unique<ScopedCpuTensorHandle>(weightInfo);
42 layer->
m_Gamma = std::make_unique<ScopedCpuTensorHandle>(weightInfo);
54 Connect(input, layer, tensorInfo);
55 Connect(layer, output, tensorInfo);
93 layer->
m_Bias = std::make_unique<ScopedCpuTensorHandle>
138 layer->
m_Bias->Allocate();
171 float inputsQScale = 1.0f;
172 float outputQScale = 2.0f;
179 layer->
m_Bias->Allocate();
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
virtual void ReleaseConstantData()
uint32_t m_PadBottom
Padding bottom value in the height dimension.
bool m_BiasEnabled
Enable/disable bias.
This layer represents a batch normalization operation.
bool m_BiasEnabled
Enable/disable bias.
uint32_t m_PadBottom
Padding bottom value in the height dimension.
std::unique_ptr< ScopedCpuTensorHandle > m_Weight
A unique pointer to store Weight values.
This layer represents a depthwise convolution 2d operation.
std::unique_ptr< ScopedCpuTensorHandle > m_Bias
A unique pointer to store Bias values.
LayerT * AddLayer(Args &&... args)
Adds a new layer, of type LayerType, to the graph constructed with the arguments passed.
bool m_TransposeWeightMatrix
Enable/disable transpose weight matrix.
std::unique_ptr< ScopedCpuTensorHandle > m_Bias
A unique pointer to store Bias values.
A Convolution2dDescriptor for the Convolution2dLayer.
uint32_t m_PadLeft
Padding left value in the width dimension.
float m_Eps
Value to add to the variance. Used to avoid dividing by zero.
std::unique_ptr< ScopedCpuTensorHandle > m_Gamma
A unique pointer to store Gamma values.
std::unique_ptr< ScopedCpuTensorHandle > m_Variance
A unique pointer to store Variance values.
uint32_t m_PadRight
Padding right value in the width dimension.
Copyright (c) 2020 ARM Limited.
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
std::unique_ptr< ScopedCpuTensorHandle > m_Beta
A unique pointer to store Beta values.
uint32_t m_PadTop
Padding top value in the height dimension.
uint32_t m_StrideX
Stride value when proceeding through input for the width dimension.
uint32_t m_StrideX
Stride value when proceeding through input for the width dimension.
A layer user-provided data can be bound to (e.g. inputs, outputs).
This layer represents a fully connected operation.
uint32_t m_PadTop
Padding top value in the height dimension.
std::unique_ptr< ScopedCpuTensorHandle > m_Mean
A unique pointer to store Mean values.
A FullyConnectedDescriptor for the FullyConnectedLayer.
std::unique_ptr< ScopedCpuTensorHandle > m_Weight
A unique pointer to store Weight values.
bool m_BiasEnabled
Enable/disable bias.
BOOST_AUTO_TEST_CASE(CheckConvolution2dLayer)
uint32_t m_StrideY
Stride value when proceeding through input for the height dimension.
DataType GetBiasDataType(DataType inputDataType)
BOOST_AUTO_TEST_SUITE_END()
uint32_t m_StrideY
Stride value when proceeding through input for the height dimension.
std::unique_ptr< ScopedCpuTensorHandle > m_Bias
A unique pointer to store Bias values.
This layer represents a convolution 2d operation.
void Connect(armnn::IConnectableLayer *from, armnn::IConnectableLayer *to, const armnn::TensorInfo &tensorInfo, unsigned int fromIndex, unsigned int toIndex)
std::unique_ptr< ScopedCpuTensorHandle > m_Weight
A unique pointer to store Weight values.
A DepthwiseConvolution2dDescriptor for the DepthwiseConvolution2dLayer.
A BatchNormalizationDescriptor for the BatchNormalizationLayer.
uint32_t m_PadLeft
Padding left value in the width dimension.
uint32_t m_PadRight
Padding right value in the width dimension.