ArmNN
 20.02
SerializerTests.cpp File Reference
#include "../Serializer.hpp"
#include <armnn/Descriptors.hpp>
#include <armnn/INetwork.hpp>
#include <armnn/TypesUtils.hpp>
#include <armnn/LstmParams.hpp>
#include <armnn/QuantizedLstmParams.hpp>
#include <armnnDeserializer/IDeserializer.hpp>
#include <random>
#include <vector>
#include <boost/test/unit_test.hpp>

Go to the source code of this file.

Macros

#define DECLARE_LAYER_VERIFIER_CLASS(name)
 
#define DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR(name)
 

Functions

 BOOST_AUTO_TEST_CASE (SerializeAddition)
 
 BOOST_AUTO_TEST_CASE (SerializeArgMinMax)
 
 BOOST_AUTO_TEST_CASE (SerializeBatchNormalization)
 
 BOOST_AUTO_TEST_CASE (SerializeBatchToSpaceNd)
 
 BOOST_AUTO_TEST_CASE (SerializeComparison)
 
 BOOST_AUTO_TEST_CASE (SerializeConstant)
 
 BOOST_AUTO_TEST_CASE (SerializeConvolution2d)
 
 BOOST_AUTO_TEST_CASE (SerializeDepthToSpace)
 
 BOOST_AUTO_TEST_CASE (SerializeDepthwiseConvolution2d)
 
 BOOST_AUTO_TEST_CASE (SerializeDequantize)
 
 BOOST_AUTO_TEST_CASE (SerializeDeserializeDetectionPostProcess)
 
 BOOST_AUTO_TEST_CASE (SerializeDivision)
 
 BOOST_AUTO_TEST_CASE (SerializeEqual)
 
 BOOST_AUTO_TEST_CASE (EnsureEqualBackwardCompatibility)
 
 BOOST_AUTO_TEST_CASE (SerializeFloor)
 
 BOOST_AUTO_TEST_CASE (SerializeFullyConnected)
 
 BOOST_AUTO_TEST_CASE (SerializeGather)
 
 BOOST_AUTO_TEST_CASE (SerializeGreater)
 
 BOOST_AUTO_TEST_CASE (EnsureGreaterBackwardCompatibility)
 
 BOOST_AUTO_TEST_CASE (SerializeInstanceNormalization)
 
 BOOST_AUTO_TEST_CASE (SerializeL2Normalization)
 
 BOOST_AUTO_TEST_CASE (EnsureL2NormalizationBackwardCompatibility)
 
 BOOST_AUTO_TEST_CASE (SerializeLogSoftmax)
 
 BOOST_AUTO_TEST_CASE (SerializeMaximum)
 
 BOOST_AUTO_TEST_CASE (SerializeMean)
 
 BOOST_AUTO_TEST_CASE (SerializeMerge)
 
 BOOST_AUTO_TEST_CASE (SerializeMerger)
 
 BOOST_AUTO_TEST_CASE (EnsureMergerLayerBackwardCompatibility)
 
 BOOST_AUTO_TEST_CASE (SerializeConcat)
 
 BOOST_AUTO_TEST_CASE (SerializeMinimum)
 
 BOOST_AUTO_TEST_CASE (SerializeMultiplication)
 
 BOOST_AUTO_TEST_CASE (SerializePrelu)
 
 BOOST_AUTO_TEST_CASE (SerializeNormalization)
 
 BOOST_AUTO_TEST_CASE (SerializePad)
 
 BOOST_AUTO_TEST_CASE (EnsurePadBackwardCompatibility)
 
 BOOST_AUTO_TEST_CASE (SerializePermute)
 
 BOOST_AUTO_TEST_CASE (SerializePooling2d)
 
 BOOST_AUTO_TEST_CASE (SerializeQuantize)
 
 BOOST_AUTO_TEST_CASE (SerializeReshape)
 
 BOOST_AUTO_TEST_CASE (SerializeResize)
 
 BOOST_AUTO_TEST_CASE (SerializeResizeBilinear)
 
 BOOST_AUTO_TEST_CASE (EnsureResizeBilinearBackwardCompatibility)
 
 BOOST_AUTO_TEST_CASE (SerializeSlice)
 
 BOOST_AUTO_TEST_CASE (SerializeSoftmax)
 
 BOOST_AUTO_TEST_CASE (SerializeSpaceToBatchNd)
 
 BOOST_AUTO_TEST_CASE (SerializeSpaceToDepth)
 
 BOOST_AUTO_TEST_CASE (SerializeSplitter)
 
 BOOST_AUTO_TEST_CASE (SerializeStack)
 
 BOOST_AUTO_TEST_CASE (SerializeStandIn)
 
 BOOST_AUTO_TEST_CASE (SerializeStridedSlice)
 
 BOOST_AUTO_TEST_CASE (SerializeSubtraction)
 
 BOOST_AUTO_TEST_CASE (SerializeSwitch)
 
 BOOST_AUTO_TEST_CASE (SerializeTranspose)
 
 BOOST_AUTO_TEST_CASE (SerializeTransposeConvolution2d)
 
 BOOST_AUTO_TEST_CASE (SerializeDeserializeNonLinearNetwork)
 
 BOOST_AUTO_TEST_CASE (SerializeDeserializeLstmCifgPeepholeNoProjection)
 
 BOOST_AUTO_TEST_CASE (SerializeDeserializeLstmNoCifgWithPeepholeAndProjection)
 
 BOOST_AUTO_TEST_CASE (SerializeDeserializeLstmNoCifgWithPeepholeWithProjectionWithLayerNorm)
 
 BOOST_AUTO_TEST_CASE (EnsureLstmLayersBackwardCompatibility)
 
 BOOST_AUTO_TEST_CASE (SerializeDeserializeQuantizedLstm)
 

Macro Definition Documentation

◆ DECLARE_LAYER_VERIFIER_CLASS

#define DECLARE_LAYER_VERIFIER_CLASS (   name)
Value:
class name##LayerVerifier : public LayerVerifierBase \
{ \
public: \
name##LayerVerifier(const std::string& layerName, \
const std::vector<armnn::TensorInfo>& inputInfos, \
const std::vector<armnn::TensorInfo>& outputInfos) \
: LayerVerifierBase(layerName, inputInfos, outputInfos) {} \
\
void Visit##name##Layer(const armnn::IConnectableLayer* layer, const char* name) override \
{ \
VerifyNameAndConnections(layer, name); \
} \
};
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61

Definition at line 25 of file SerializerTests.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR

#define DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR (   name)
Value:
class name##LayerVerifier : public LayerVerifierBaseWithDescriptor<armnn::name##Descriptor> \
{ \
public: \
name##LayerVerifier(const std::string& layerName, \
const std::vector<armnn::TensorInfo>& inputInfos, \
const std::vector<armnn::TensorInfo>& outputInfos, \
const armnn::name##Descriptor& descriptor) \
: LayerVerifierBaseWithDescriptor<armnn::name##Descriptor>( \
layerName, inputInfos, outputInfos, descriptor) {} \
\
void Visit##name##Layer(const armnn::IConnectableLayer* layer, \
const armnn::name##Descriptor& descriptor, \
const char* name) override \
{ \
VerifyNameAndConnections(layer, name); \
VerifyDescriptor(descriptor); \
} \
};
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61

Definition at line 40 of file SerializerTests.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/60]

BOOST_AUTO_TEST_CASE ( SerializeAddition  )

Definition at line 271 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), and IOutputSlot::SetTensorInfo().

272 {
274 
275  const std::string layerName("addition");
276  const armnn::TensorInfo tensorInfo({1, 2, 3}, armnn::DataType::Float32);
277 
279  armnn::IConnectableLayer* const inputLayer0 = network->AddInputLayer(0);
280  armnn::IConnectableLayer* const inputLayer1 = network->AddInputLayer(1);
281  armnn::IConnectableLayer* const additionLayer = network->AddAdditionLayer(layerName.c_str());
282  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
283 
284  inputLayer0->GetOutputSlot(0).Connect(additionLayer->GetInputSlot(0));
285  inputLayer1->GetOutputSlot(0).Connect(additionLayer->GetInputSlot(1));
286  additionLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
287 
288  inputLayer0->GetOutputSlot(0).SetTensorInfo(tensorInfo);
289  inputLayer1->GetOutputSlot(0).SetTensorInfo(tensorInfo);
290  additionLayer->GetOutputSlot(0).SetTensorInfo(tensorInfo);
291 
292  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
293  BOOST_CHECK(deserializedNetwork);
294 
295  AdditionLayerVerifier verifier(layerName, {tensorInfo, tensorInfo}, {tensorInfo});
296  deserializedNetwork->Accept(verifier);
297 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
#define DECLARE_LAYER_VERIFIER_CLASS(name)
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [2/60]

BOOST_AUTO_TEST_CASE ( SerializeArgMinMax  )

Definition at line 299 of file SerializerTests.cpp.

References armnn::ArgMinMax(), BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), ArgMinMaxDescriptor::m_Function, armnn::Max, IOutputSlot::SetTensorInfo(), and armnn::Signed32.

300 {
302 
303  const std::string layerName("argminmax");
304  const armnn::TensorInfo inputInfo({1, 2, 3}, armnn::DataType::Float32);
305  const armnn::TensorInfo outputInfo({1, 3}, armnn::DataType::Signed32);
306 
307  armnn::ArgMinMaxDescriptor descriptor;
309  descriptor.m_Axis = 1;
310 
312  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
313  armnn::IConnectableLayer* const argMinMaxLayer = network->AddArgMinMaxLayer(descriptor, layerName.c_str());
314  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
315 
316  inputLayer->GetOutputSlot(0).Connect(argMinMaxLayer->GetInputSlot(0));
317  argMinMaxLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
318 
319  inputLayer->GetOutputSlot(0).SetTensorInfo(inputInfo);
320  argMinMaxLayer->GetOutputSlot(0).SetTensorInfo(outputInfo);
321 
322  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
323  BOOST_CHECK(deserializedNetwork);
324 
325  ArgMinMaxLayerVerifier verifier(layerName, {inputInfo}, {outputInfo}, descriptor);
326  deserializedNetwork->Accept(verifier);
327 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
void ArgMinMax(Decoder< float > &in, int32_t *out, const TensorInfo &inputTensorInfo, const TensorInfo &outputTensorInfo, ArgMinMaxFunction function, int axis)
Definition: ArgMinMax.cpp:15
ArgMinMaxFunction m_Function
Specify if the function is to find Min or Max.
Definition: Descriptors.hpp:56
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
An ArgMinMaxDescriptor for ArgMinMaxLayer.
Definition: Descriptors.hpp:43
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
#define DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR(name)
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [3/60]

BOOST_AUTO_TEST_CASE ( SerializeBatchNormalization  )

Definition at line 329 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), BatchNormalizationDescriptor::m_Eps, armnn::NHWC, and IOutputSlot::SetTensorInfo().

330 {
331  using Descriptor = armnn::BatchNormalizationDescriptor;
332  class BatchNormalizationLayerVerifier : public LayerVerifierBaseWithDescriptor<Descriptor>
333  {
334  public:
335  BatchNormalizationLayerVerifier(const std::string& layerName,
336  const std::vector<armnn::TensorInfo>& inputInfos,
337  const std::vector<armnn::TensorInfo>& outputInfos,
338  const Descriptor& descriptor,
339  const armnn::ConstTensor& mean,
340  const armnn::ConstTensor& variance,
341  const armnn::ConstTensor& beta,
342  const armnn::ConstTensor& gamma)
343  : LayerVerifierBaseWithDescriptor<Descriptor>(layerName, inputInfos, outputInfos, descriptor)
344  , m_Mean(mean)
345  , m_Variance(variance)
346  , m_Beta(beta)
347  , m_Gamma(gamma) {}
348 
349  void VisitBatchNormalizationLayer(const armnn::IConnectableLayer* layer,
350  const Descriptor& descriptor,
351  const armnn::ConstTensor& mean,
352  const armnn::ConstTensor& variance,
353  const armnn::ConstTensor& beta,
354  const armnn::ConstTensor& gamma,
355  const char* name) override
356  {
357  VerifyNameAndConnections(layer, name);
358  VerifyDescriptor(descriptor);
359 
360  CompareConstTensor(mean, m_Mean);
361  CompareConstTensor(variance, m_Variance);
362  CompareConstTensor(beta, m_Beta);
363  CompareConstTensor(gamma, m_Gamma);
364  }
365 
366  private:
367  armnn::ConstTensor m_Mean;
368  armnn::ConstTensor m_Variance;
369  armnn::ConstTensor m_Beta;
370  armnn::ConstTensor m_Gamma;
371  };
372 
373  const std::string layerName("batchNormalization");
374  const armnn::TensorInfo inputInfo ({ 1, 3, 3, 1 }, armnn::DataType::Float32);
375  const armnn::TensorInfo outputInfo({ 1, 3, 3, 1 }, armnn::DataType::Float32);
376 
377  const armnn::TensorInfo meanInfo({1}, armnn::DataType::Float32);
378  const armnn::TensorInfo varianceInfo({1}, armnn::DataType::Float32);
379  const armnn::TensorInfo betaInfo({1}, armnn::DataType::Float32);
380  const armnn::TensorInfo gammaInfo({1}, armnn::DataType::Float32);
381 
383  descriptor.m_Eps = 0.0010000000475f;
384  descriptor.m_DataLayout = armnn::DataLayout::NHWC;
385 
386  std::vector<float> meanData({5.0});
387  std::vector<float> varianceData({2.0});
388  std::vector<float> betaData({1.0});
389  std::vector<float> gammaData({0.0});
390 
391  armnn::ConstTensor mean(meanInfo, meanData);
392  armnn::ConstTensor variance(varianceInfo, varianceData);
393  armnn::ConstTensor beta(betaInfo, betaData);
394  armnn::ConstTensor gamma(gammaInfo, gammaData);
395 
397  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
398  armnn::IConnectableLayer* const batchNormalizationLayer =
399  network->AddBatchNormalizationLayer(descriptor, mean, variance, beta, gamma, layerName.c_str());
400  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
401 
402  inputLayer->GetOutputSlot(0).Connect(batchNormalizationLayer->GetInputSlot(0));
403  batchNormalizationLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
404 
405  inputLayer->GetOutputSlot(0).SetTensorInfo(inputInfo);
406  batchNormalizationLayer->GetOutputSlot(0).SetTensorInfo(outputInfo);
407 
408  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
409  BOOST_CHECK(deserializedNetwork);
410 
411  BatchNormalizationLayerVerifier verifier(
412  layerName, {inputInfo}, {outputInfo}, descriptor, mean, variance, beta, gamma);
413  deserializedNetwork->Accept(verifier);
414 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
float m_Eps
Value to add to the variance. Used to avoid dividing by zero.
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
Definition: Tensor.hpp:199
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49
A BatchNormalizationDescriptor for the BatchNormalizationLayer.

◆ BOOST_AUTO_TEST_CASE() [4/60]

BOOST_AUTO_TEST_CASE ( SerializeBatchToSpaceNd  )

Definition at line 416 of file SerializerTests.cpp.

References armnn::BatchToSpaceNd(), BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), BatchToSpaceNdDescriptor::m_DataLayout, armnn::NCHW, and IOutputSlot::SetTensorInfo().

417 {
419 
420  const std::string layerName("spaceToBatchNd");
421  const armnn::TensorInfo inputInfo({4, 1, 2, 2}, armnn::DataType::Float32);
422  const armnn::TensorInfo outputInfo({1, 1, 4, 4}, armnn::DataType::Float32);
423 
426  desc.m_BlockShape = {2, 2};
427  desc.m_Crops = {{0, 0}, {0, 0}};
428 
430  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
431  armnn::IConnectableLayer* const batchToSpaceNdLayer = network->AddBatchToSpaceNdLayer(desc, layerName.c_str());
432  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
433 
434  inputLayer->GetOutputSlot(0).Connect(batchToSpaceNdLayer->GetInputSlot(0));
435  batchToSpaceNdLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
436 
437  inputLayer->GetOutputSlot(0).SetTensorInfo(inputInfo);
438  batchToSpaceNdLayer->GetOutputSlot(0).SetTensorInfo(outputInfo);
439 
440  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
441  BOOST_CHECK(deserializedNetwork);
442 
443  BatchToSpaceNdLayerVerifier verifier(layerName, {inputInfo}, {outputInfo}, desc);
444  deserializedNetwork->Accept(verifier);
445 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
A BatchToSpaceNdDescriptor for the BatchToSpaceNdLayer.
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
#define DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR(name)
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
void BatchToSpaceNd(const DataLayoutIndexed &dataLayout, const TensorInfo &inputTensorInfo, const TensorInfo &outputTensorInfo, const std::vector< unsigned int > &blockShape, const std::vector< std::pair< unsigned int, unsigned int >> &cropsData, Decoder< float > &inputDecoder, Encoder< float > &outputEncoder)
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [5/60]

BOOST_AUTO_TEST_CASE ( SerializeComparison  )

Definition at line 447 of file SerializerTests.cpp.

References armnn::Boolean, BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), armnn::NotEqual, and IOutputSlot::SetTensorInfo().

448 {
450 
451  const std::string layerName("comparison");
452 
453  const armnn::TensorShape shape{2, 1, 2, 4};
454 
457 
459 
461  armnn::IConnectableLayer* const inputLayer0 = network->AddInputLayer(0);
462  armnn::IConnectableLayer* const inputLayer1 = network->AddInputLayer(1);
463  armnn::IConnectableLayer* const comparisonLayer = network->AddComparisonLayer(descriptor, layerName.c_str());
464  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
465 
466  inputLayer0->GetOutputSlot(0).Connect(comparisonLayer->GetInputSlot(0));
467  inputLayer1->GetOutputSlot(0).Connect(comparisonLayer->GetInputSlot(1));
468  comparisonLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
469 
470  inputLayer0->GetOutputSlot(0).SetTensorInfo(inputInfo);
471  inputLayer1->GetOutputSlot(0).SetTensorInfo(inputInfo);
472  comparisonLayer->GetOutputSlot(0).SetTensorInfo(outputInfo);
473 
474  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
475  BOOST_CHECK(deserializedNetwork);
476 
477  ComparisonLayerVerifier verifier(layerName, { inputInfo, inputInfo }, { outputInfo }, descriptor);
478  deserializedNetwork->Accept(verifier);
479 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
A ComparisonDescriptor for the ComparisonLayer.
Definition: Descriptors.hpp:62
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
#define DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR(name)
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [6/60]

BOOST_AUTO_TEST_CASE ( SerializeConstant  )

Definition at line 481 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), and IOutputSlot::SetTensorInfo().

482 {
483  class ConstantLayerVerifier : public LayerVerifierBase
484  {
485  public:
486  ConstantLayerVerifier(const std::string& layerName,
487  const std::vector<armnn::TensorInfo>& inputInfos,
488  const std::vector<armnn::TensorInfo>& outputInfos,
489  const armnn::ConstTensor& layerInput)
490  : LayerVerifierBase(layerName, inputInfos, outputInfos)
491  , m_LayerInput(layerInput) {}
492 
493  void VisitConstantLayer(const armnn::IConnectableLayer* layer,
494  const armnn::ConstTensor& input,
495  const char* name) override
496  {
497  VerifyNameAndConnections(layer, name);
498  CompareConstTensor(input, m_LayerInput);
499  }
500 
501  void VisitAdditionLayer(const armnn::IConnectableLayer*, const char*) override {}
502 
503  private:
504  armnn::ConstTensor m_LayerInput;
505  };
506 
507  const std::string layerName("constant");
509 
510  std::vector<float> constantData = GenerateRandomData<float>(info.GetNumElements());
511  armnn::ConstTensor constTensor(info, constantData);
512 
514  armnn::IConnectableLayer* input = network->AddInputLayer(0);
515  armnn::IConnectableLayer* constant = network->AddConstantLayer(constTensor, layerName.c_str());
516  armnn::IConnectableLayer* add = network->AddAdditionLayer();
517  armnn::IConnectableLayer* output = network->AddOutputLayer(0);
518 
519  input->GetOutputSlot(0).Connect(add->GetInputSlot(0));
520  constant->GetOutputSlot(0).Connect(add->GetInputSlot(1));
521  add->GetOutputSlot(0).Connect(output->GetInputSlot(0));
522 
523  input->GetOutputSlot(0).SetTensorInfo(info);
524  constant->GetOutputSlot(0).SetTensorInfo(info);
525  add->GetOutputSlot(0).SetTensorInfo(info);
526 
527  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
528  BOOST_CHECK(deserializedNetwork);
529 
530  ConstantLayerVerifier verifier(layerName, {}, {info}, constTensor);
531  deserializedNetwork->Accept(verifier);
532 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
Definition: Tensor.hpp:199
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [7/60]

BOOST_AUTO_TEST_CASE ( SerializeConvolution2d  )

Definition at line 534 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), OptionalBase::has_value(), Convolution2dDescriptor::m_BiasEnabled, Convolution2dDescriptor::m_DataLayout, Convolution2dDescriptor::m_DilationX, Convolution2dDescriptor::m_DilationY, Convolution2dDescriptor::m_PadBottom, Convolution2dDescriptor::m_PadLeft, Convolution2dDescriptor::m_PadRight, Convolution2dDescriptor::m_PadTop, Convolution2dDescriptor::m_StrideX, Convolution2dDescriptor::m_StrideY, armnn::NHWC, IOutputSlot::SetTensorInfo(), and OptionalReferenceSwitch< IsReference, T >::value().

535 {
536  using Descriptor = armnn::Convolution2dDescriptor;
537  class Convolution2dLayerVerifier : public LayerVerifierBaseWithDescriptor<Descriptor>
538  {
539  public:
540  Convolution2dLayerVerifier(const std::string& layerName,
541  const std::vector<armnn::TensorInfo>& inputInfos,
542  const std::vector<armnn::TensorInfo>& outputInfos,
543  const Descriptor& descriptor,
544  const armnn::ConstTensor& weights,
546  : LayerVerifierBaseWithDescriptor<Descriptor>(layerName, inputInfos, outputInfos, descriptor)
547  , m_Weights(weights)
548  , m_Biases(biases) {}
549 
550  void VisitConvolution2dLayer(const armnn::IConnectableLayer* layer,
551  const Descriptor& descriptor,
552  const armnn::ConstTensor& weights,
554  const char* name) override
555  {
556  VerifyNameAndConnections(layer, name);
557  VerifyDescriptor(descriptor);
558 
559  // check weights
560  CompareConstTensor(weights, m_Weights);
561 
562  // check biases
563  BOOST_CHECK(biases.has_value() == descriptor.m_BiasEnabled);
564  BOOST_CHECK(biases.has_value() == m_Biases.has_value());
565 
566  if (biases.has_value() && m_Biases.has_value())
567  {
568  CompareConstTensor(biases.value(), m_Biases.value());
569  }
570  }
571 
572  private:
573  armnn::ConstTensor m_Weights;
575  };
576 
577  const std::string layerName("convolution2d");
578  const armnn::TensorInfo inputInfo ({ 1, 5, 5, 1 }, armnn::DataType::Float32);
579  const armnn::TensorInfo outputInfo({ 1, 3, 3, 1 }, armnn::DataType::Float32);
580 
581  const armnn::TensorInfo weightsInfo({ 1, 3, 3, 1 }, armnn::DataType::Float32);
582  const armnn::TensorInfo biasesInfo ({ 1 }, armnn::DataType::Float32);
583 
584  std::vector<float> weightsData = GenerateRandomData<float>(weightsInfo.GetNumElements());
585  armnn::ConstTensor weights(weightsInfo, weightsData);
586 
587  std::vector<float> biasesData = GenerateRandomData<float>(biasesInfo.GetNumElements());
588  armnn::ConstTensor biases(biasesInfo, biasesData);
589 
591  descriptor.m_PadLeft = 1;
592  descriptor.m_PadRight = 1;
593  descriptor.m_PadTop = 1;
594  descriptor.m_PadBottom = 1;
595  descriptor.m_StrideX = 2;
596  descriptor.m_StrideY = 2;
597  descriptor.m_DilationX = 2;
598  descriptor.m_DilationY = 2;
599  descriptor.m_BiasEnabled = true;
601 
603  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
604  armnn::IConnectableLayer* const convLayer =
605  network->AddConvolution2dLayer(descriptor,
606  weights,
608  layerName.c_str());
609  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
610 
611  inputLayer->GetOutputSlot(0).Connect(convLayer->GetInputSlot(0));
612  convLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
613 
614  inputLayer->GetOutputSlot(0).SetTensorInfo(inputInfo);
615  convLayer->GetOutputSlot(0).SetTensorInfo(outputInfo);
616 
617  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
618  BOOST_CHECK(deserializedNetwork);
619 
620  Convolution2dLayerVerifier verifier(layerName, {inputInfo}, {outputInfo}, descriptor, weights, biases);
621  deserializedNetwork->Accept(verifier);
622 }
uint32_t m_PadBottom
Padding bottom value in the height dimension.
bool m_BiasEnabled
Enable/disable bias.
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
A Convolution2dDescriptor for the Convolution2dLayer.
uint32_t m_PadRight
Padding right value in the width dimension.
uint32_t m_DilationY
Dilation along y axis.
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
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.
bool has_value() const noexcept
Definition: Optional.hpp:53
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
Definition: Tensor.hpp:199
uint32_t m_StrideY
Stride value when proceeding through input for the height dimension.
uint32_t m_DilationX
Dilation along x axis.
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49
uint32_t m_PadLeft
Padding left value in the width dimension.

◆ BOOST_AUTO_TEST_CASE() [8/60]

BOOST_AUTO_TEST_CASE ( SerializeDepthToSpace  )

Definition at line 624 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR, armnn::DepthToSpace(), armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), SpaceToDepthDescriptor::m_BlockSize, armnn::NHWC, and IOutputSlot::SetTensorInfo().

625 {
627 
628  const std::string layerName("depthToSpace");
629 
630  const armnn::TensorInfo inputInfo ({ 1, 8, 4, 12 }, armnn::DataType::Float32);
631  const armnn::TensorInfo outputInfo({ 1, 16, 8, 3 }, armnn::DataType::Float32);
632 
634  desc.m_BlockSize = 2;
635  desc.m_DataLayout = armnn::DataLayout::NHWC;
636 
638  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
639  armnn::IConnectableLayer* const depthToSpaceLayer = network->AddDepthToSpaceLayer(desc, layerName.c_str());
640  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
641 
642  inputLayer->GetOutputSlot(0).Connect(depthToSpaceLayer->GetInputSlot(0));
643  depthToSpaceLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
644 
645  inputLayer->GetOutputSlot(0).SetTensorInfo(inputInfo);
646  depthToSpaceLayer->GetOutputSlot(0).SetTensorInfo(outputInfo);
647 
648  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
649  BOOST_CHECK(deserializedNetwork);
650 
651  DepthToSpaceLayerVerifier verifier(layerName, {inputInfo}, {outputInfo}, desc);
652  deserializedNetwork->Accept(verifier);
653 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
void DepthToSpace(const TensorInfo &inputInfo, const DepthToSpaceDescriptor &descriptor, const void *inputData, void *outputData, unsigned int dataTypeSize)
A SpaceToDepthDescriptor for the SpaceToDepthLayer.
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
unsigned int m_BlockSize
Scalar specifying the input block size. It must be >= 1.
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
#define DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR(name)
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [9/60]

BOOST_AUTO_TEST_CASE ( SerializeDepthwiseConvolution2d  )

Definition at line 655 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), OptionalBase::has_value(), DepthwiseConvolution2dDescriptor::m_BiasEnabled, DepthwiseConvolution2dDescriptor::m_DataLayout, DepthwiseConvolution2dDescriptor::m_DilationX, DepthwiseConvolution2dDescriptor::m_DilationY, DepthwiseConvolution2dDescriptor::m_PadBottom, DepthwiseConvolution2dDescriptor::m_PadLeft, DepthwiseConvolution2dDescriptor::m_PadRight, DepthwiseConvolution2dDescriptor::m_PadTop, DepthwiseConvolution2dDescriptor::m_StrideX, DepthwiseConvolution2dDescriptor::m_StrideY, armnn::NHWC, IOutputSlot::SetTensorInfo(), and OptionalReferenceSwitch< IsReference, T >::value().

656 {
657  using Descriptor = armnn::DepthwiseConvolution2dDescriptor;
658  class DepthwiseConvolution2dLayerVerifier : public LayerVerifierBaseWithDescriptor<Descriptor>
659  {
660  public:
661  DepthwiseConvolution2dLayerVerifier(const std::string& layerName,
662  const std::vector<armnn::TensorInfo>& inputInfos,
663  const std::vector<armnn::TensorInfo>& outputInfos,
664  const Descriptor& descriptor,
665  const armnn::ConstTensor& weights,
666  const armnn::Optional<armnn::ConstTensor>& biases) :
667  LayerVerifierBaseWithDescriptor<Descriptor>(layerName, inputInfos, outputInfos, descriptor),
668  m_Weights(weights),
669  m_Biases(biases) {}
670 
671  void VisitDepthwiseConvolution2dLayer(const armnn::IConnectableLayer* layer,
672  const Descriptor& descriptor,
673  const armnn::ConstTensor& weights,
675  const char* name) override
676  {
677  VerifyNameAndConnections(layer, name);
678  VerifyDescriptor(descriptor);
679 
680  // check weights
681  CompareConstTensor(weights, m_Weights);
682 
683  // check biases
684  BOOST_CHECK(biases.has_value() == descriptor.m_BiasEnabled);
685  BOOST_CHECK(biases.has_value() == m_Biases.has_value());
686 
687  if (biases.has_value() && m_Biases.has_value())
688  {
689  CompareConstTensor(biases.value(), m_Biases.value());
690  }
691  }
692 
693  private:
694  armnn::ConstTensor m_Weights;
696  };
697 
698  const std::string layerName("depwiseConvolution2d");
699  const armnn::TensorInfo inputInfo ({ 1, 5, 5, 3 }, armnn::DataType::Float32);
700  const armnn::TensorInfo outputInfo({ 1, 3, 3, 3 }, armnn::DataType::Float32);
701 
702  const armnn::TensorInfo weightsInfo({ 1, 3, 3, 3 }, armnn::DataType::Float32);
703  const armnn::TensorInfo biasesInfo ({ 3 }, armnn::DataType::Float32);
704 
705  std::vector<float> weightsData = GenerateRandomData<float>(weightsInfo.GetNumElements());
706  armnn::ConstTensor weights(weightsInfo, weightsData);
707 
708  std::vector<int32_t> biasesData = GenerateRandomData<int32_t>(biasesInfo.GetNumElements());
709  armnn::ConstTensor biases(biasesInfo, biasesData);
710 
712  descriptor.m_PadLeft = 1;
713  descriptor.m_PadRight = 1;
714  descriptor.m_PadTop = 1;
715  descriptor.m_PadBottom = 1;
716  descriptor.m_StrideX = 2;
717  descriptor.m_StrideY = 2;
718  descriptor.m_DilationX = 2;
719  descriptor.m_DilationY = 2;
720  descriptor.m_BiasEnabled = true;
722 
724  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
725  armnn::IConnectableLayer* const depthwiseConvLayer =
726  network->AddDepthwiseConvolution2dLayer(descriptor,
727  weights,
729  layerName.c_str());
730  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
731 
732  inputLayer->GetOutputSlot(0).Connect(depthwiseConvLayer->GetInputSlot(0));
733  depthwiseConvLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
734 
735  inputLayer->GetOutputSlot(0).SetTensorInfo(inputInfo);
736  depthwiseConvLayer->GetOutputSlot(0).SetTensorInfo(outputInfo);
737 
738  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
739  BOOST_CHECK(deserializedNetwork);
740 
741  DepthwiseConvolution2dLayerVerifier verifier(layerName, {inputInfo}, {outputInfo}, descriptor, weights, biases);
742  deserializedNetwork->Accept(verifier);
743 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
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_DilationY
Dilation factor value for height dimension.
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
uint32_t m_StrideX
Stride value when proceeding through input for the width dimension.
uint32_t m_DilationX
Dilation factor value for width dimension.
uint32_t m_PadTop
Padding top value in the height dimension.
bool has_value() const noexcept
Definition: Optional.hpp:53
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
Definition: Tensor.hpp:199
uint32_t m_StrideY
Stride value when proceeding through input for the height dimension.
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49
A DepthwiseConvolution2dDescriptor for the DepthwiseConvolution2dLayer.
uint32_t m_PadRight
Padding right value in the width dimension.

◆ BOOST_AUTO_TEST_CASE() [10/60]

BOOST_AUTO_TEST_CASE ( SerializeDequantize  )

Definition at line 745 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS, armnn::Dequantize(), armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), armnn::QAsymmU8, and IOutputSlot::SetTensorInfo().

746 {
748 
749  const std::string layerName("dequantize");
750  const armnn::TensorInfo inputInfo({ 1, 5, 2, 3 }, armnn::DataType::QAsymmU8, 0.5f, 1);
751  const armnn::TensorInfo outputInfo({ 1, 5, 2, 3 }, armnn::DataType::Float32);
752 
754  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
755  armnn::IConnectableLayer* const dequantizeLayer = network->AddDequantizeLayer(layerName.c_str());
756  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
757 
758  inputLayer->GetOutputSlot(0).Connect(dequantizeLayer->GetInputSlot(0));
759  dequantizeLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
760 
761  inputLayer->GetOutputSlot(0).SetTensorInfo(inputInfo);
762  dequantizeLayer->GetOutputSlot(0).SetTensorInfo(outputInfo);
763 
764  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
765  BOOST_CHECK(deserializedNetwork);
766 
767  DequantizeLayerVerifier verifier(layerName, {inputInfo}, {outputInfo});
768  deserializedNetwork->Accept(verifier);
769 }
float Dequantize(QuantizedType value, float scale, int32_t offset)
Dequantize an 8-bit data type into a floating point data type.
Definition: TypesUtils.cpp:47
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
#define DECLARE_LAYER_VERIFIER_CLASS(name)
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [11/60]

BOOST_AUTO_TEST_CASE ( SerializeDeserializeDetectionPostProcess  )

Definition at line 771 of file SerializerTests.cpp.

References anchors(), anchorsInfo, BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), DetectionPostProcessDescriptor::m_DetectionsPerClass, DetectionPostProcessDescriptor::m_MaxClassesPerDetection, DetectionPostProcessDescriptor::m_MaxDetections, DetectionPostProcessDescriptor::m_NmsIouThreshold, DetectionPostProcessDescriptor::m_NmsScoreThreshold, DetectionPostProcessDescriptor::m_NumClasses, DetectionPostProcessDescriptor::m_ScaleH, DetectionPostProcessDescriptor::m_ScaleW, DetectionPostProcessDescriptor::m_ScaleX, DetectionPostProcessDescriptor::m_ScaleY, DetectionPostProcessDescriptor::m_UseRegularNms, and IOutputSlot::SetTensorInfo().

772 {
773  using Descriptor = armnn::DetectionPostProcessDescriptor;
774  class DetectionPostProcessLayerVerifier : public LayerVerifierBaseWithDescriptor<Descriptor>
775  {
776  public:
777  DetectionPostProcessLayerVerifier(const std::string& layerName,
778  const std::vector<armnn::TensorInfo>& inputInfos,
779  const std::vector<armnn::TensorInfo>& outputInfos,
780  const Descriptor& descriptor,
782  : LayerVerifierBaseWithDescriptor<Descriptor>(layerName, inputInfos, outputInfos, descriptor)
783  , m_Anchors(anchors) {}
784 
785  void VisitDetectionPostProcessLayer(const armnn::IConnectableLayer* layer,
786  const Descriptor& descriptor,
788  const char* name) override
789  {
790  VerifyNameAndConnections(layer, name);
791  VerifyDescriptor(descriptor);
792 
793  CompareConstTensor(anchors, m_Anchors);
794  }
795 
796  private:
797  armnn::ConstTensor m_Anchors;
798  };
799 
800  const std::string layerName("detectionPostProcess");
801 
802  const std::vector<armnn::TensorInfo> inputInfos({
805  });
806 
807  const std::vector<armnn::TensorInfo> outputInfos({
812  });
813 
815  descriptor.m_UseRegularNms = true;
816  descriptor.m_MaxDetections = 3;
817  descriptor.m_MaxClassesPerDetection = 1;
818  descriptor.m_DetectionsPerClass =1;
819  descriptor.m_NmsScoreThreshold = 0.0;
820  descriptor.m_NmsIouThreshold = 0.5;
821  descriptor.m_NumClasses = 2;
822  descriptor.m_ScaleY = 10.0;
823  descriptor.m_ScaleX = 10.0;
824  descriptor.m_ScaleH = 5.0;
825  descriptor.m_ScaleW = 5.0;
826 
828  const std::vector<float> anchorsData({
829  0.5f, 0.5f, 1.0f, 1.0f,
830  0.5f, 0.5f, 1.0f, 1.0f,
831  0.5f, 0.5f, 1.0f, 1.0f,
832  0.5f, 10.5f, 1.0f, 1.0f,
833  0.5f, 10.5f, 1.0f, 1.0f,
834  0.5f, 100.5f, 1.0f, 1.0f
835  });
836  armnn::ConstTensor anchors(anchorsInfo, anchorsData);
837 
839  armnn::IConnectableLayer* const detectionLayer =
840  network->AddDetectionPostProcessLayer(descriptor, anchors, layerName.c_str());
841 
842  for (unsigned int i = 0; i < 2; i++)
843  {
844  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(static_cast<int>(i));
845  inputLayer->GetOutputSlot(0).Connect(detectionLayer->GetInputSlot(i));
846  inputLayer->GetOutputSlot(0).SetTensorInfo(inputInfos[i]);
847  }
848 
849  for (unsigned int i = 0; i < 4; i++)
850  {
851  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(static_cast<int>(i));
852  detectionLayer->GetOutputSlot(i).Connect(outputLayer->GetInputSlot(0));
853  detectionLayer->GetOutputSlot(i).SetTensorInfo(outputInfos[i]);
854  }
855 
856  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
857  BOOST_CHECK(deserializedNetwork);
858 
859  DetectionPostProcessLayerVerifier verifier(layerName, inputInfos, outputInfos, descriptor, anchors);
860  deserializedNetwork->Accept(verifier);
861 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
float m_ScaleW
Center size encoding scale weight.
float m_ScaleX
Center size encoding scale x.
uint32_t m_DetectionsPerClass
Detections per classes, used in Regular NMS.
armnn::TensorInfo anchorsInfo({ 6, 4 }, armnn::DataType::Float32)
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
uint32_t m_MaxClassesPerDetection
Maximum numbers of classes per detection, used in Fast NMS.
uint32_t m_MaxDetections
Maximum numbers of detections.
float m_NmsIouThreshold
Intersection over union threshold.
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
Definition: Tensor.hpp:199
uint32_t m_NumClasses
Number of classes.
bool m_UseRegularNms
Use Regular NMS.
float m_ScaleH
Center size encoding scale height.
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
float m_ScaleY
Center size encoding scale y.
float m_NmsScoreThreshold
NMS score threshold.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49
std::vector< float > anchors({ 0.5f, 0.5f, 1.0f, 1.0f, 0.5f, 0.5f, 1.0f, 1.0f, 0.5f, 0.5f, 1.0f, 1.0f, 0.5f, 10.5f, 1.0f, 1.0f, 0.5f, 10.5f, 1.0f, 1.0f, 0.5f, 100.5f, 1.0f, 1.0f })

◆ BOOST_AUTO_TEST_CASE() [12/60]

BOOST_AUTO_TEST_CASE ( SerializeDivision  )

Definition at line 863 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS, armnn::Equal, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), ComparisonDescriptor::m_Operation, and IOutputSlot::SetTensorInfo().

864 {
866 
867  const std::string layerName("division");
868  const armnn::TensorInfo info({ 1, 5, 2, 3 }, armnn::DataType::Float32);
869 
871  armnn::IConnectableLayer* const inputLayer0 = network->AddInputLayer(0);
872  armnn::IConnectableLayer* const inputLayer1 = network->AddInputLayer(1);
873  armnn::IConnectableLayer* const divisionLayer = network->AddDivisionLayer(layerName.c_str());
874  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
875 
876  inputLayer0->GetOutputSlot(0).Connect(divisionLayer->GetInputSlot(0));
877  inputLayer1->GetOutputSlot(0).Connect(divisionLayer->GetInputSlot(1));
878  divisionLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
879 
880  inputLayer0->GetOutputSlot(0).SetTensorInfo(info);
881  inputLayer1->GetOutputSlot(0).SetTensorInfo(info);
882  divisionLayer->GetOutputSlot(0).SetTensorInfo(info);
883 
884  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
885  BOOST_CHECK(deserializedNetwork);
886 
887  DivisionLayerVerifier verifier(layerName, {info, info}, {info});
888  deserializedNetwork->Accept(verifier);
889 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
#define DECLARE_LAYER_VERIFIER_CLASS(name)
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [13/60]

BOOST_AUTO_TEST_CASE ( SerializeEqual  )

Definition at line 916 of file SerializerTests.cpp.

References ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, armnn::Boolean, BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), armnn::Float32, IConnectableLayer::GetOutputSlot(), and IOutputSlot::SetTensorInfo().

917 {
918  const std::string layerName("equal");
919 
920  const armnn::TensorShape shape{2, 1, 2, 4};
921 
924 
926  armnn::IConnectableLayer* const inputLayer0 = network->AddInputLayer(0);
927  armnn::IConnectableLayer* const inputLayer1 = network->AddInputLayer(1);
929  armnn::IConnectableLayer* const equalLayer = network->AddEqualLayer(layerName.c_str());
931  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
932 
933  inputLayer0->GetOutputSlot(0).Connect(equalLayer->GetInputSlot(0));
934  inputLayer1->GetOutputSlot(0).Connect(equalLayer->GetInputSlot(1));
935  equalLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
936 
937  inputLayer0->GetOutputSlot(0).SetTensorInfo(inputInfo);
938  inputLayer1->GetOutputSlot(0).SetTensorInfo(inputInfo);
939  equalLayer->GetOutputSlot(0).SetTensorInfo(outputInfo);
940 
941  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
942  BOOST_CHECK(deserializedNetwork);
943 
944  EqualLayerVerifier verifier(layerName, { inputInfo, inputInfo }, { outputInfo });
945  deserializedNetwork->Accept(verifier);
946 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
#define ARMNN_NO_DEPRECATE_WARN_BEGIN
Definition: Deprecated.hpp:33
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
#define ARMNN_NO_DEPRECATE_WARN_END
Definition: Deprecated.hpp:34
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [14/60]

BOOST_AUTO_TEST_CASE ( EnsureEqualBackwardCompatibility  )

Definition at line 948 of file SerializerTests.cpp.

References armnn::Boolean, BOOST_CHECK(), and armnn::Float32.

949 {
950  // The hex data below is a flat buffer containing a simple network with two inputs,
951  // an EqualLayer (now deprecated) and an output
952  //
953  // This test verifies that we can still deserialize this old-style model by replacing
954  // the EqualLayer with an equivalent ComparisonLayer
955  const std::vector<uint8_t> equalModel =
956  {
957  0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x10, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x0A, 0x00,
958  0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
959  0xCC, 0x01, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00,
960  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
961  0x60, 0xFE, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x0B, 0x04, 0x00, 0x00, 0x00, 0xFE, 0xFE, 0xFF, 0xFF, 0x04, 0x00,
962  0x00, 0x00, 0x06, 0xFF, 0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0xEA, 0xFE, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00,
963  0x10, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00,
964  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
965  0x64, 0xFF, 0xFF, 0xFF, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB4, 0xFE, 0xFF, 0xFF, 0x00, 0x00,
966  0x00, 0x13, 0x04, 0x00, 0x00, 0x00, 0x52, 0xFF, 0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0x36, 0xFF, 0xFF, 0xFF,
967  0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x1C, 0x00,
968  0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x65, 0x71, 0x75, 0x61, 0x6C, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
969  0x5C, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x34, 0xFF,
970  0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0x92, 0xFE, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x04, 0x08, 0x00, 0x00, 0x00,
971  0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00,
972  0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x10, 0x00, 0x04, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00,
973  0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x00, 0x00,
974  0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0E, 0x00,
975  0x07, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00,
976  0x06, 0x00, 0x08, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0E, 0x00,
977  0x04, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
978  0x0E, 0x00, 0x18, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x10, 0x00, 0x14, 0x00, 0x0E, 0x00, 0x00, 0x00,
979  0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00,
980  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
981  0x0C, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00,
982  0x00, 0x00, 0x66, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
983  0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00,
984  0x00, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x07, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09,
985  0x04, 0x00, 0x00, 0x00, 0xF6, 0xFF, 0xFF, 0xFF, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x0A, 0x00,
986  0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x14, 0x00, 0x00, 0x00,
987  0x04, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x10, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00,
988  0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
989  0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0A, 0x00, 0x00, 0x00,
990  0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x10, 0x00, 0x08, 0x00,
991  0x07, 0x00, 0x0C, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
992  0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
993  0x04, 0x00, 0x00, 0x00
994  };
995 
996  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(std::string(equalModel.begin(), equalModel.end()));
997  BOOST_CHECK(deserializedNetwork);
998 
999  const armnn::TensorShape shape{ 2, 1, 2, 4 };
1000 
1003 
1004  EqualLayerVerifier verifier("equal", { inputInfo, inputInfo }, { outputInfo });
1005  deserializedNetwork->Accept(verifier);
1006 }
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101

◆ BOOST_AUTO_TEST_CASE() [15/60]

BOOST_AUTO_TEST_CASE ( SerializeFloor  )

Definition at line 1008 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), and IOutputSlot::SetTensorInfo().

1009 {
1011 
1012  const std::string layerName("floor");
1014 
1016  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
1017  armnn::IConnectableLayer* const floorLayer = network->AddFloorLayer(layerName.c_str());
1018  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
1019 
1020  inputLayer->GetOutputSlot(0).Connect(floorLayer->GetInputSlot(0));
1021  floorLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
1022 
1023  inputLayer->GetOutputSlot(0).SetTensorInfo(info);
1024  floorLayer->GetOutputSlot(0).SetTensorInfo(info);
1025 
1026  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
1027  BOOST_CHECK(deserializedNetwork);
1028 
1029  FloorLayerVerifier verifier(layerName, {info}, {info});
1030  deserializedNetwork->Accept(verifier);
1031 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
#define DECLARE_LAYER_VERIFIER_CLASS(name)
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [16/60]

BOOST_AUTO_TEST_CASE ( SerializeFullyConnected  )

Definition at line 1033 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), OptionalBase::has_value(), FullyConnectedDescriptor::m_BiasEnabled, FullyConnectedDescriptor::m_TransposeWeightMatrix, IOutputSlot::SetTensorInfo(), and OptionalReferenceSwitch< IsReference, T >::value().

1034 {
1035  using Descriptor = armnn::FullyConnectedDescriptor;
1036  class FullyConnectedLayerVerifier : public LayerVerifierBaseWithDescriptor<Descriptor>
1037  {
1038  public:
1039  FullyConnectedLayerVerifier(const std::string& layerName,
1040  const std::vector<armnn::TensorInfo>& inputInfos,
1041  const std::vector<armnn::TensorInfo>& outputInfos,
1042  const Descriptor& descriptor,
1043  const armnn::ConstTensor& weight,
1045  : LayerVerifierBaseWithDescriptor<Descriptor>(layerName, inputInfos, outputInfos, descriptor)
1046  , m_Weight(weight)
1047  , m_Bias(bias) {}
1048 
1049  void VisitFullyConnectedLayer(const armnn::IConnectableLayer* layer,
1050  const Descriptor& descriptor,
1051  const armnn::ConstTensor& weight,
1053  const char* name) override
1054  {
1055  VerifyNameAndConnections(layer, name);
1056  VerifyDescriptor(descriptor);
1057 
1058  CompareConstTensor(weight, m_Weight);
1059 
1060  BOOST_TEST(bias.has_value() == descriptor.m_BiasEnabled);
1061  BOOST_TEST(bias.has_value() == m_Bias.has_value());
1062 
1063  if (bias.has_value() && m_Bias.has_value())
1064  {
1065  CompareConstTensor(bias.value(), m_Bias.value());
1066  }
1067  }
1068 
1069  private:
1070  armnn::ConstTensor m_Weight;
1072  };
1073 
1074  const std::string layerName("fullyConnected");
1075  const armnn::TensorInfo inputInfo ({ 2, 5, 1, 1 }, armnn::DataType::Float32);
1076  const armnn::TensorInfo outputInfo({ 2, 3 }, armnn::DataType::Float32);
1077 
1078  const armnn::TensorInfo weightsInfo({ 5, 3 }, armnn::DataType::Float32);
1079  const armnn::TensorInfo biasesInfo ({ 3 }, armnn::DataType::Float32);
1080  std::vector<float> weightsData = GenerateRandomData<float>(weightsInfo.GetNumElements());
1081  std::vector<float> biasesData = GenerateRandomData<float>(biasesInfo.GetNumElements());
1082  armnn::ConstTensor weights(weightsInfo, weightsData);
1083  armnn::ConstTensor biases(biasesInfo, biasesData);
1084 
1086  descriptor.m_BiasEnabled = true;
1087  descriptor.m_TransposeWeightMatrix = false;
1088 
1090  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
1091  armnn::IConnectableLayer* const fullyConnectedLayer =
1092  network->AddFullyConnectedLayer(descriptor,
1093  weights,
1095  layerName.c_str());
1096  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
1097 
1098  inputLayer->GetOutputSlot(0).Connect(fullyConnectedLayer->GetInputSlot(0));
1099  fullyConnectedLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
1100 
1101  inputLayer->GetOutputSlot(0).SetTensorInfo(inputInfo);
1102  fullyConnectedLayer->GetOutputSlot(0).SetTensorInfo(outputInfo);
1103 
1104  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
1105  BOOST_CHECK(deserializedNetwork);
1106 
1107  FullyConnectedLayerVerifier verifier(layerName, {inputInfo}, {outputInfo}, descriptor, weights, biases);
1108  deserializedNetwork->Accept(verifier);
1109 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
bool m_TransposeWeightMatrix
Enable/disable transpose weight matrix.
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
bool has_value() const noexcept
Definition: Optional.hpp:53
A FullyConnectedDescriptor for the FullyConnectedLayer.
bool m_BiasEnabled
Enable/disable bias.
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
Definition: Tensor.hpp:199
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [17/60]

BOOST_AUTO_TEST_CASE ( SerializeGather  )

Definition at line 1111 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), armnn::Greater, ComparisonDescriptor::m_Operation, armnn::QAsymmU8, TensorInfo::SetQuantizationScale(), IOutputSlot::SetTensorInfo(), and armnn::Signed32.

1112 {
1113  class GatherLayerVerifier : public LayerVerifierBase
1114  {
1115  public:
1116  GatherLayerVerifier(const std::string& layerName,
1117  const std::vector<armnn::TensorInfo>& inputInfos,
1118  const std::vector<armnn::TensorInfo>& outputInfos)
1119  : LayerVerifierBase(layerName, inputInfos, outputInfos) {}
1120 
1121  void VisitGatherLayer(const armnn::IConnectableLayer* layer, const char *name) override
1122  {
1123  VerifyNameAndConnections(layer, name);
1124  }
1125 
1126  void VisitConstantLayer(const armnn::IConnectableLayer*,
1127  const armnn::ConstTensor&,
1128  const char*) override {}
1129  };
1130 
1131  const std::string layerName("gather");
1132  armnn::TensorInfo paramsInfo({ 8 }, armnn::DataType::QAsymmU8);
1133  armnn::TensorInfo outputInfo({ 3 }, armnn::DataType::QAsymmU8);
1134  const armnn::TensorInfo indicesInfo({ 3 }, armnn::DataType::Signed32);
1135 
1136  paramsInfo.SetQuantizationScale(1.0f);
1137  paramsInfo.SetQuantizationOffset(0);
1138  outputInfo.SetQuantizationScale(1.0f);
1139  outputInfo.SetQuantizationOffset(0);
1140 
1141  const std::vector<int32_t>& indicesData = {7, 6, 5};
1142 
1144  armnn::IConnectableLayer *const inputLayer = network->AddInputLayer(0);
1145  armnn::IConnectableLayer *const constantLayer =
1146  network->AddConstantLayer(armnn::ConstTensor(indicesInfo, indicesData));
1147  armnn::IConnectableLayer *const gatherLayer = network->AddGatherLayer(layerName.c_str());
1148  armnn::IConnectableLayer *const outputLayer = network->AddOutputLayer(0);
1149 
1150  inputLayer->GetOutputSlot(0).Connect(gatherLayer->GetInputSlot(0));
1151  constantLayer->GetOutputSlot(0).Connect(gatherLayer->GetInputSlot(1));
1152  gatherLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
1153 
1154  inputLayer->GetOutputSlot(0).SetTensorInfo(paramsInfo);
1155  constantLayer->GetOutputSlot(0).SetTensorInfo(indicesInfo);
1156  gatherLayer->GetOutputSlot(0).SetTensorInfo(outputInfo);
1157 
1158  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
1159  BOOST_CHECK(deserializedNetwork);
1160 
1161  GatherLayerVerifier verifier(layerName, {paramsInfo, indicesInfo}, {outputInfo});
1162  deserializedNetwork->Accept(verifier);
1163 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
Definition: Tensor.hpp:199
void SetQuantizationScale(float scale)
Definition: Tensor.cpp:259
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [18/60]

BOOST_AUTO_TEST_CASE ( SerializeGreater  )

Definition at line 1190 of file SerializerTests.cpp.

References ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, armnn::Boolean, BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), armnn::Float32, IConnectableLayer::GetOutputSlot(), and IOutputSlot::SetTensorInfo().

1191 {
1192  const std::string layerName("greater");
1193 
1194  const armnn::TensorShape shape{2, 1, 2, 4};
1195 
1198 
1200  armnn::IConnectableLayer* const inputLayer0 = network->AddInputLayer(0);
1201  armnn::IConnectableLayer* const inputLayer1 = network->AddInputLayer(1);
1203  armnn::IConnectableLayer* const equalLayer = network->AddGreaterLayer(layerName.c_str());
1205  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
1206 
1207  inputLayer0->GetOutputSlot(0).Connect(equalLayer->GetInputSlot(0));
1208  inputLayer1->GetOutputSlot(0).Connect(equalLayer->GetInputSlot(1));
1209  equalLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
1210 
1211  inputLayer0->GetOutputSlot(0).SetTensorInfo(inputInfo);
1212  inputLayer1->GetOutputSlot(0).SetTensorInfo(inputInfo);
1213  equalLayer->GetOutputSlot(0).SetTensorInfo(outputInfo);
1214 
1215  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
1216  BOOST_CHECK(deserializedNetwork);
1217 
1218  GreaterLayerVerifier verifier(layerName, { inputInfo, inputInfo }, { outputInfo });
1219  deserializedNetwork->Accept(verifier);
1220 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
#define ARMNN_NO_DEPRECATE_WARN_BEGIN
Definition: Deprecated.hpp:33
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
#define ARMNN_NO_DEPRECATE_WARN_END
Definition: Deprecated.hpp:34
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [19/60]

BOOST_AUTO_TEST_CASE ( EnsureGreaterBackwardCompatibility  )

Definition at line 1222 of file SerializerTests.cpp.

References armnn::Boolean, BOOST_CHECK(), and armnn::Float32.

1223 {
1224  // The hex data below is a flat buffer containing a simple network with two inputs,
1225  // an GreaterLayer (now deprecated) and an output
1226  //
1227  // This test verifies that we can still deserialize this old-style model by replacing
1228  // the GreaterLayer with an equivalent ComparisonLayer
1229  const std::vector<uint8_t> greaterModel =
1230  {
1231  0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x10, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x0A, 0x00,
1232  0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
1233  0xCC, 0x01, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00,
1234  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
1235  0x60, 0xFE, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x0B, 0x04, 0x00, 0x00, 0x00, 0xFE, 0xFE, 0xFF, 0xFF, 0x04, 0x00,
1236  0x00, 0x00, 0x06, 0xFF, 0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0xEA, 0xFE, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00,
1237  0x10, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00,
1238  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1239  0x64, 0xFF, 0xFF, 0xFF, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB4, 0xFE, 0xFF, 0xFF, 0x00, 0x00,
1240  0x00, 0x19, 0x04, 0x00, 0x00, 0x00, 0x52, 0xFF, 0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0x36, 0xFF, 0xFF, 0xFF,
1241  0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x1C, 0x00,
1242  0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x67, 0x72, 0x65, 0x61, 0x74, 0x65, 0x72, 0x00, 0x02, 0x00, 0x00, 0x00,
1243  0x5C, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x34, 0xFF,
1244  0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0x92, 0xFE, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x04, 0x08, 0x00, 0x00, 0x00,
1245  0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00,
1246  0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x10, 0x00, 0x04, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00,
1247  0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x00, 0x00,
1248  0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0E, 0x00,
1249  0x07, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00,
1250  0x06, 0x00, 0x08, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0E, 0x00,
1251  0x04, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
1252  0x0E, 0x00, 0x18, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x10, 0x00, 0x14, 0x00, 0x0E, 0x00, 0x00, 0x00,
1253  0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00,
1254  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
1255  0x0C, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00,
1256  0x00, 0x00, 0x66, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1257  0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00,
1258  0x00, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x07, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09,
1259  0x04, 0x00, 0x00, 0x00, 0xF6, 0xFF, 0xFF, 0xFF, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x0A, 0x00,
1260  0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x14, 0x00, 0x00, 0x00,
1261  0x04, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x10, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00,
1262  0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1263  0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0A, 0x00, 0x00, 0x00,
1264  0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x10, 0x00, 0x08, 0x00,
1265  0x07, 0x00, 0x0C, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
1266  0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
1267  0x02, 0x00, 0x00, 0x00
1268  };
1269 
1270  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(std::string(greaterModel.begin(), greaterModel.end()));
1271  BOOST_CHECK(deserializedNetwork);
1272 
1273  const armnn::TensorShape shape{ 1, 2, 2, 2 };
1274 
1277 
1278  GreaterLayerVerifier verifier("greater", { inputInfo, inputInfo }, { outputInfo });
1279  deserializedNetwork->Accept(verifier);
1280 }
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101

◆ BOOST_AUTO_TEST_CASE() [20/60]

BOOST_AUTO_TEST_CASE ( SerializeInstanceNormalization  )

Definition at line 1282 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), InstanceNormalizationDescriptor::m_Gamma, armnn::NHWC, and IOutputSlot::SetTensorInfo().

1283 {
1284  DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR(InstanceNormalization)
1285 
1286  const std::string layerName("instanceNormalization");
1287  const armnn::TensorInfo info({ 1, 2, 1, 5 }, armnn::DataType::Float32);
1288 
1290  descriptor.m_Gamma = 1.1f;
1291  descriptor.m_Beta = 0.1f;
1292  descriptor.m_Eps = 0.0001f;
1293  descriptor.m_DataLayout = armnn::DataLayout::NHWC;
1294 
1296  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
1297  armnn::IConnectableLayer* const instanceNormLayer =
1298  network->AddInstanceNormalizationLayer(descriptor, layerName.c_str());
1299  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
1300 
1301  inputLayer->GetOutputSlot(0).Connect(instanceNormLayer->GetInputSlot(0));
1302  instanceNormLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
1303 
1304  inputLayer->GetOutputSlot(0).SetTensorInfo(info);
1305  instanceNormLayer->GetOutputSlot(0).SetTensorInfo(info);
1306 
1307  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
1308  BOOST_CHECK(deserializedNetwork);
1309 
1310  InstanceNormalizationLayerVerifier verifier(layerName, {info}, {info}, descriptor);
1311  deserializedNetwork->Accept(verifier);
1312 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
float m_Gamma
Gamma, the scale scalar value applied for the normalized tensor. Defaults to 1.0. ...
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
#define DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR(name)
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
An InstanceNormalizationDescriptor for InstanceNormalizationLayer.
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [21/60]

BOOST_AUTO_TEST_CASE ( SerializeL2Normalization  )

Definition at line 1316 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), L2NormalizationDescriptor::m_DataLayout, armnn::NCHW, and IOutputSlot::SetTensorInfo().

1317 {
1318  const std::string l2NormLayerName("l2Normalization");
1319  const armnn::TensorInfo info({1, 2, 1, 5}, armnn::DataType::Float32);
1320 
1323  desc.m_Eps = 0.0001f;
1324 
1326  armnn::IConnectableLayer* const inputLayer0 = network->AddInputLayer(0);
1327  armnn::IConnectableLayer* const l2NormLayer = network->AddL2NormalizationLayer(desc, l2NormLayerName.c_str());
1328  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
1329 
1330  inputLayer0->GetOutputSlot(0).Connect(l2NormLayer->GetInputSlot(0));
1331  l2NormLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
1332 
1333  inputLayer0->GetOutputSlot(0).SetTensorInfo(info);
1334  l2NormLayer->GetOutputSlot(0).SetTensorInfo(info);
1335 
1336  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
1337  BOOST_CHECK(deserializedNetwork);
1338 
1339  L2NormalizationLayerVerifier verifier(l2NormLayerName, {info}, {info}, desc);
1340  deserializedNetwork->Accept(verifier);
1341 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
A L2NormalizationDescriptor for the L2NormalizationLayer.
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [22/60]

BOOST_AUTO_TEST_CASE ( EnsureL2NormalizationBackwardCompatibility  )

Definition at line 1343 of file SerializerTests.cpp.

References BOOST_CHECK(), armnn::Float32, L2NormalizationDescriptor::m_DataLayout, and armnn::NCHW.

1344 {
1345  // The hex data below is a flat buffer containing a simple network with one input
1346  // a L2Normalization layer and an output layer with dimensions as per the tensor infos below.
1347  //
1348  // This test verifies that we can still read back these old style
1349  // models without the normalization epsilon value.
1350  const std::vector<uint8_t> l2NormalizationModel =
1351  {
1352  0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x10, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x0A, 0x00,
1353  0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
1354  0x3C, 0x01, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
1355  0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xE8, 0xFE, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x0B,
1356  0x04, 0x00, 0x00, 0x00, 0xD6, 0xFE, 0xFF, 0xFF, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x08, 0x00,
1357  0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x9E, 0xFF, 0xFF, 0xFF, 0x02, 0x00, 0x00, 0x00,
1358  0x10, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00,
1359  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1360  0x4C, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
1361  0x00, 0x20, 0x0C, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x04, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00,
1362  0x20, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x06, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
1363  0x0E, 0x00, 0x18, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x10, 0x00, 0x14, 0x00, 0x0E, 0x00, 0x00, 0x00,
1364  0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x20, 0x00,
1365  0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x6C, 0x32, 0x4E, 0x6F, 0x72, 0x6D, 0x61, 0x6C, 0x69, 0x7A, 0x61, 0x74,
1366  0x69, 0x6F, 0x6E, 0x00, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0C, 0x00,
1367  0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
1368  0x52, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
1369  0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
1370  0x08, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1371  0x00, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x07, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09,
1372  0x04, 0x00, 0x00, 0x00, 0xF6, 0xFF, 0xFF, 0xFF, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x0A, 0x00,
1373  0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x14, 0x00, 0x00, 0x00,
1374  0x04, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x10, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00,
1375  0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1376  0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0A, 0x00, 0x00, 0x00,
1377  0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x10, 0x00, 0x08, 0x00,
1378  0x07, 0x00, 0x0C, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
1379  0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
1380  0x05, 0x00, 0x00, 0x00, 0x00
1381  };
1382 
1383  armnn::INetworkPtr deserializedNetwork =
1384  DeserializeNetwork(std::string(l2NormalizationModel.begin(), l2NormalizationModel.end()));
1385  BOOST_CHECK(deserializedNetwork);
1386 
1387  const std::string layerName("l2Normalization");
1388  const armnn::TensorInfo inputInfo = armnn::TensorInfo({1, 2, 1, 5}, armnn::DataType::Float32);
1389 
1392  // Since this variable does not exist in the l2NormalizationModel dump, the default value will be loaded
1393  desc.m_Eps = 1e-12f;
1394 
1395  L2NormalizationLayerVerifier verifier(layerName, {inputInfo}, {inputInfo}, desc);
1396  deserializedNetwork->Accept(verifier);
1397 }
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
A L2NormalizationDescriptor for the L2NormalizationLayer.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101

◆ BOOST_AUTO_TEST_CASE() [23/60]

BOOST_AUTO_TEST_CASE ( SerializeLogSoftmax  )

Definition at line 1399 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), armnn::LogSoftmax(), SoftmaxDescriptor::m_Beta, and IOutputSlot::SetTensorInfo().

1400 {
1402 
1403  const std::string layerName("log_softmax");
1405 
1406  armnn::LogSoftmaxDescriptor descriptor;
1407  descriptor.m_Beta = 1.0f;
1408  descriptor.m_Axis = -1;
1409 
1411  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
1412  armnn::IConnectableLayer* const logSoftmaxLayer = network->AddLogSoftmaxLayer(descriptor, layerName.c_str());
1413  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
1414 
1415  inputLayer->GetOutputSlot(0).Connect(logSoftmaxLayer->GetInputSlot(0));
1416  logSoftmaxLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
1417 
1418  inputLayer->GetOutputSlot(0).SetTensorInfo(info);
1419  logSoftmaxLayer->GetOutputSlot(0).SetTensorInfo(info);
1420 
1421  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
1422  BOOST_CHECK(deserializedNetwork);
1423 
1424  LogSoftmaxLayerVerifier verifier(layerName, {info}, {info}, descriptor);
1425  deserializedNetwork->Accept(verifier);
1426 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
float m_Beta
Exponentiation value.
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
void LogSoftmax(Decoder< float > &input, Encoder< float > &output, const TensorInfo &inputInfo, const LogSoftmaxDescriptor &descriptor)
Definition: LogSoftmax.cpp:30
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
#define DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR(name)
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
A SoftmaxDescriptor for the SoftmaxLayer.
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [24/60]

BOOST_AUTO_TEST_CASE ( SerializeMaximum  )

Definition at line 1428 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), and IOutputSlot::SetTensorInfo().

1429 {
1431 
1432  const std::string layerName("maximum");
1433  const armnn::TensorInfo info({ 1, 2, 2, 3 }, armnn::DataType::Float32);
1434 
1436  armnn::IConnectableLayer* const inputLayer0 = network->AddInputLayer(0);
1437  armnn::IConnectableLayer* const inputLayer1 = network->AddInputLayer(1);
1438  armnn::IConnectableLayer* const maximumLayer = network->AddMaximumLayer(layerName.c_str());
1439  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
1440 
1441  inputLayer0->GetOutputSlot(0).Connect(maximumLayer->GetInputSlot(0));
1442  inputLayer1->GetOutputSlot(0).Connect(maximumLayer->GetInputSlot(1));
1443  maximumLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
1444 
1445  inputLayer0->GetOutputSlot(0).SetTensorInfo(info);
1446  inputLayer1->GetOutputSlot(0).SetTensorInfo(info);
1447  maximumLayer->GetOutputSlot(0).SetTensorInfo(info);
1448 
1449  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
1450  BOOST_CHECK(deserializedNetwork);
1451 
1452  MaximumLayerVerifier verifier(layerName, {info, info}, {info});
1453  deserializedNetwork->Accept(verifier);
1454 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
#define DECLARE_LAYER_VERIFIER_CLASS(name)
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [25/60]

BOOST_AUTO_TEST_CASE ( SerializeMean  )

Definition at line 1456 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), MeanDescriptor::m_Axis, armnn::Mean(), and IOutputSlot::SetTensorInfo().

1457 {
1459 
1460  const std::string layerName("mean");
1461  const armnn::TensorInfo inputInfo({1, 1, 3, 2}, armnn::DataType::Float32);
1462  const armnn::TensorInfo outputInfo({1, 1, 1, 2}, armnn::DataType::Float32);
1463 
1464  armnn::MeanDescriptor descriptor;
1465  descriptor.m_Axis = { 2 };
1466  descriptor.m_KeepDims = true;
1467 
1469  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
1470  armnn::IConnectableLayer* const meanLayer = network->AddMeanLayer(descriptor, layerName.c_str());
1471  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
1472 
1473  inputLayer->GetOutputSlot(0).Connect(meanLayer->GetInputSlot(0));
1474  meanLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
1475 
1476  inputLayer->GetOutputSlot(0).SetTensorInfo(inputInfo);
1477  meanLayer->GetOutputSlot(0).SetTensorInfo(outputInfo);
1478 
1479  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
1480  BOOST_CHECK(deserializedNetwork);
1481 
1482  MeanLayerVerifier verifier(layerName, {inputInfo}, {outputInfo}, descriptor);
1483  deserializedNetwork->Accept(verifier);
1484 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
std::vector< unsigned int > m_Axis
Values for the dimensions to reduce.
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
A MeanDescriptor for the MeanLayer.
void Mean(const armnn::TensorInfo &inputInfo, const armnn::TensorInfo &outputInfo, const std::vector< unsigned int > &axis, Decoder< float > &input, Encoder< float > &output)
Definition: Mean.cpp:71
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
#define DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR(name)
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [26/60]

BOOST_AUTO_TEST_CASE ( SerializeMerge  )

Definition at line 1486 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), and IOutputSlot::SetTensorInfo().

1487 {
1489 
1490  const std::string layerName("merge");
1491  const armnn::TensorInfo info({ 1, 2, 2, 3 }, armnn::DataType::Float32);
1492 
1494  armnn::IConnectableLayer* const inputLayer0 = network->AddInputLayer(0);
1495  armnn::IConnectableLayer* const inputLayer1 = network->AddInputLayer(1);
1496  armnn::IConnectableLayer* const mergeLayer = network->AddMergeLayer(layerName.c_str());
1497  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
1498 
1499  inputLayer0->GetOutputSlot(0).Connect(mergeLayer->GetInputSlot(0));
1500  inputLayer1->GetOutputSlot(0).Connect(mergeLayer->GetInputSlot(1));
1501  mergeLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
1502 
1503  inputLayer0->GetOutputSlot(0).SetTensorInfo(info);
1504  inputLayer1->GetOutputSlot(0).SetTensorInfo(info);
1505  mergeLayer->GetOutputSlot(0).SetTensorInfo(info);
1506 
1507  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
1508  BOOST_CHECK(deserializedNetwork);
1509 
1510  MergeLayerVerifier verifier(layerName, {info, info}, {info});
1511  deserializedNetwork->Accept(verifier);
1512 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
#define DECLARE_LAYER_VERIFIER_CLASS(name)
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [27/60]

BOOST_AUTO_TEST_CASE ( SerializeMerger  )

Definition at line 1542 of file SerializerTests.cpp.

References ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), armnn::CreateDescriptorForConcatenation(), armnn::Float32, IConnectableLayer::GetOutputSlot(), TensorInfo::GetShape(), and IOutputSlot::SetTensorInfo().

1543 {
1544  const std::string layerName("merger");
1545  const armnn::TensorInfo inputInfo = armnn::TensorInfo({2, 3, 2, 2}, armnn::DataType::Float32);
1546  const armnn::TensorInfo outputInfo = armnn::TensorInfo({4, 3, 2, 2}, armnn::DataType::Float32);
1547 
1548  const std::vector<armnn::TensorShape> shapes({inputInfo.GetShape(), inputInfo.GetShape()});
1549 
1550  armnn::OriginsDescriptor descriptor =
1551  armnn::CreateDescriptorForConcatenation(shapes.begin(), shapes.end(), 0);
1552 
1554  armnn::IConnectableLayer* const inputLayerOne = network->AddInputLayer(0);
1555  armnn::IConnectableLayer* const inputLayerTwo = network->AddInputLayer(1);
1557  armnn::IConnectableLayer* const mergerLayer = network->AddMergerLayer(descriptor, layerName.c_str());
1559  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
1560 
1561  inputLayerOne->GetOutputSlot(0).Connect(mergerLayer->GetInputSlot(0));
1562  inputLayerTwo->GetOutputSlot(0).Connect(mergerLayer->GetInputSlot(1));
1563  mergerLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
1564 
1565  inputLayerOne->GetOutputSlot(0).SetTensorInfo(inputInfo);
1566  inputLayerTwo->GetOutputSlot(0).SetTensorInfo(inputInfo);
1567  mergerLayer->GetOutputSlot(0).SetTensorInfo(outputInfo);
1568 
1569  std::string mergerLayerNetwork = SerializeNetwork(*network);
1570  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(mergerLayerNetwork);
1571  BOOST_CHECK(deserializedNetwork);
1572 
1573  MergerLayerVerifier verifier(layerName, {inputInfo, inputInfo}, {outputInfo}, descriptor);
1574  deserializedNetwork->Accept(verifier);
1575 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
const TensorShape & GetShape() const
Definition: Tensor.hpp:88
#define ARMNN_NO_DEPRECATE_WARN_BEGIN
Definition: Deprecated.hpp:33
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
#define ARMNN_NO_DEPRECATE_WARN_END
Definition: Deprecated.hpp:34
An OriginsDescriptor for the ConcatLayer.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
OriginsDescriptor CreateDescriptorForConcatenation(TensorShapeIt first, TensorShapeIt last, unsigned int concatenationDimension)
Convenience template to create an OriginsDescriptor to use when creating a ConcatLayer for performing...
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [28/60]

BOOST_AUTO_TEST_CASE ( EnsureMergerLayerBackwardCompatibility  )

Definition at line 1577 of file SerializerTests.cpp.

References BOOST_CHECK(), armnn::CreateDescriptorForConcatenation(), armnn::Float32, and TensorInfo::GetShape().

1578 {
1579  // The hex data below is a flat buffer containing a simple network with two inputs
1580  // a merger layer (now deprecated) and an output layer with dimensions as per the tensor infos below.
1581  //
1582  // This test verifies that we can still read back these old style
1583  // models replacing the MergerLayers with ConcatLayers with the same parameters.
1584  const std::vector<uint8_t> mergerModel =
1585  {
1586  0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x10, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x0A, 0x00,
1587  0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
1588  0x38, 0x02, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00,
1589  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
1590  0xF4, 0xFD, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x0B, 0x04, 0x00, 0x00, 0x00, 0x92, 0xFE, 0xFF, 0xFF, 0x04, 0x00,
1591  0x00, 0x00, 0x9A, 0xFE, 0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0x7E, 0xFE, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00,
1592  0x10, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00,
1593  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1594  0xF8, 0xFE, 0xFF, 0xFF, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0xFE, 0xFF, 0xFF, 0x00, 0x00,
1595  0x00, 0x1F, 0x0C, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x04, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00,
1596  0x68, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x10, 0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x00,
1597  0x0C, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
1598  0x02, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x22, 0xFF, 0xFF, 0xFF, 0x04, 0x00,
1599  0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1600  0x00, 0x00, 0x00, 0x00, 0x3E, 0xFF, 0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
1601  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0xFF, 0xFF, 0xFF,
1602  0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x1C, 0x00,
1603  0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x6D, 0x65, 0x72, 0x67, 0x65, 0x72, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
1604  0x5C, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x34, 0xFF,
1605  0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0x92, 0xFE, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00,
1606  0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00,
1607  0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x10, 0x00, 0x04, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00,
1608  0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x00, 0x00,
1609  0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0E, 0x00,
1610  0x07, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00,
1611  0x06, 0x00, 0x08, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0E, 0x00,
1612  0x04, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
1613  0x0E, 0x00, 0x18, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x10, 0x00, 0x14, 0x00, 0x0E, 0x00, 0x00, 0x00,
1614  0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00,
1615  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
1616  0x0C, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00,
1617  0x00, 0x00, 0x66, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1618  0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00,
1619  0x00, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x07, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09,
1620  0x04, 0x00, 0x00, 0x00, 0xF6, 0xFF, 0xFF, 0xFF, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x0A, 0x00,
1621  0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x14, 0x00, 0x00, 0x00,
1622  0x04, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x10, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00,
1623  0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1624  0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0A, 0x00, 0x00, 0x00,
1625  0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x10, 0x00, 0x08, 0x00,
1626  0x07, 0x00, 0x0C, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
1627  0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
1628  0x02, 0x00, 0x00, 0x00
1629  };
1630 
1631  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(std::string(mergerModel.begin(), mergerModel.end()));
1632  BOOST_CHECK(deserializedNetwork);
1633 
1634  const armnn::TensorInfo inputInfo = armnn::TensorInfo({ 2, 3, 2, 2 }, armnn::DataType::Float32);
1635  const armnn::TensorInfo outputInfo = armnn::TensorInfo({ 4, 3, 2, 2 }, armnn::DataType::Float32);
1636 
1637  const std::vector<armnn::TensorShape> shapes({inputInfo.GetShape(), inputInfo.GetShape()});
1638 
1639  armnn::OriginsDescriptor descriptor =
1640  armnn::CreateDescriptorForConcatenation(shapes.begin(), shapes.end(), 0);
1641 
1642  MergerLayerVerifier verifier("merger", { inputInfo, inputInfo }, { outputInfo }, descriptor);
1643  deserializedNetwork->Accept(verifier);
1644 }
const TensorShape & GetShape() const
Definition: Tensor.hpp:88
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
An OriginsDescriptor for the ConcatLayer.
OriginsDescriptor CreateDescriptorForConcatenation(TensorShapeIt first, TensorShapeIt last, unsigned int concatenationDimension)
Convenience template to create an OriginsDescriptor to use when creating a ConcatLayer for performing...
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101

◆ BOOST_AUTO_TEST_CASE() [29/60]

BOOST_AUTO_TEST_CASE ( SerializeConcat  )

Definition at line 1646 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), armnn::CreateDescriptorForConcatenation(), armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), TensorInfo::GetShape(), and IOutputSlot::SetTensorInfo().

1647 {
1648  const std::string layerName("concat");
1649  const armnn::TensorInfo inputInfo = armnn::TensorInfo({2, 3, 2, 2}, armnn::DataType::Float32);
1650  const armnn::TensorInfo outputInfo = armnn::TensorInfo({4, 3, 2, 2}, armnn::DataType::Float32);
1651 
1652  const std::vector<armnn::TensorShape> shapes({inputInfo.GetShape(), inputInfo.GetShape()});
1653 
1654  armnn::OriginsDescriptor descriptor =
1655  armnn::CreateDescriptorForConcatenation(shapes.begin(), shapes.end(), 0);
1656 
1658  armnn::IConnectableLayer* const inputLayerOne = network->AddInputLayer(0);
1659  armnn::IConnectableLayer* const inputLayerTwo = network->AddInputLayer(1);
1660  armnn::IConnectableLayer* const concatLayer = network->AddConcatLayer(descriptor, layerName.c_str());
1661  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
1662 
1663  inputLayerOne->GetOutputSlot(0).Connect(concatLayer->GetInputSlot(0));
1664  inputLayerTwo->GetOutputSlot(0).Connect(concatLayer->GetInputSlot(1));
1665  concatLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
1666 
1667  inputLayerOne->GetOutputSlot(0).SetTensorInfo(inputInfo);
1668  inputLayerTwo->GetOutputSlot(0).SetTensorInfo(inputInfo);
1669  concatLayer->GetOutputSlot(0).SetTensorInfo(outputInfo);
1670 
1671  std::string concatLayerNetwork = SerializeNetwork(*network);
1672  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(concatLayerNetwork);
1673  BOOST_CHECK(deserializedNetwork);
1674 
1675  // NOTE: using the MergerLayerVerifier to ensure that it is a concat layer and not a
1676  // merger layer that gets placed into the graph.
1677  MergerLayerVerifier verifier(layerName, {inputInfo, inputInfo}, {outputInfo}, descriptor);
1678  deserializedNetwork->Accept(verifier);
1679 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
const TensorShape & GetShape() const
Definition: Tensor.hpp:88
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
An OriginsDescriptor for the ConcatLayer.
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
OriginsDescriptor CreateDescriptorForConcatenation(TensorShapeIt first, TensorShapeIt last, unsigned int concatenationDimension)
Convenience template to create an OriginsDescriptor to use when creating a ConcatLayer for performing...
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [30/60]

BOOST_AUTO_TEST_CASE ( SerializeMinimum  )

Definition at line 1681 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), and IOutputSlot::SetTensorInfo().

1682 {
1684 
1685  const std::string layerName("minimum");
1686  const armnn::TensorInfo info({ 1, 2, 2, 3 }, armnn::DataType::Float32);
1687 
1689  armnn::IConnectableLayer* const inputLayer0 = network->AddInputLayer(0);
1690  armnn::IConnectableLayer* const inputLayer1 = network->AddInputLayer(1);
1691  armnn::IConnectableLayer* const minimumLayer = network->AddMinimumLayer(layerName.c_str());
1692  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
1693 
1694  inputLayer0->GetOutputSlot(0).Connect(minimumLayer->GetInputSlot(0));
1695  inputLayer1->GetOutputSlot(0).Connect(minimumLayer->GetInputSlot(1));
1696  minimumLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
1697 
1698  inputLayer0->GetOutputSlot(0).SetTensorInfo(info);
1699  inputLayer1->GetOutputSlot(0).SetTensorInfo(info);
1700  minimumLayer->GetOutputSlot(0).SetTensorInfo(info);
1701 
1702  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
1703  BOOST_CHECK(deserializedNetwork);
1704 
1705  MinimumLayerVerifier verifier(layerName, {info, info}, {info});
1706  deserializedNetwork->Accept(verifier);
1707 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
#define DECLARE_LAYER_VERIFIER_CLASS(name)
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [31/60]

BOOST_AUTO_TEST_CASE ( SerializeMultiplication  )

Definition at line 1709 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), and IOutputSlot::SetTensorInfo().

1710 {
1711  DECLARE_LAYER_VERIFIER_CLASS(Multiplication)
1712 
1713  const std::string layerName("multiplication");
1714  const armnn::TensorInfo info({ 1, 5, 2, 3 }, armnn::DataType::Float32);
1715 
1717  armnn::IConnectableLayer* const inputLayer0 = network->AddInputLayer(0);
1718  armnn::IConnectableLayer* const inputLayer1 = network->AddInputLayer(1);
1719  armnn::IConnectableLayer* const multiplicationLayer = network->AddMultiplicationLayer(layerName.c_str());
1720  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
1721 
1722  inputLayer0->GetOutputSlot(0).Connect(multiplicationLayer->GetInputSlot(0));
1723  inputLayer1->GetOutputSlot(0).Connect(multiplicationLayer->GetInputSlot(1));
1724  multiplicationLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
1725 
1726  inputLayer0->GetOutputSlot(0).SetTensorInfo(info);
1727  inputLayer1->GetOutputSlot(0).SetTensorInfo(info);
1728  multiplicationLayer->GetOutputSlot(0).SetTensorInfo(info);
1729 
1730  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
1731  BOOST_CHECK(deserializedNetwork);
1732 
1733  MultiplicationLayerVerifier verifier(layerName, {info, info}, {info});
1734  deserializedNetwork->Accept(verifier);
1735 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
#define DECLARE_LAYER_VERIFIER_CLASS(name)
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [32/60]

BOOST_AUTO_TEST_CASE ( SerializePrelu  )

Definition at line 1737 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), and IOutputSlot::SetTensorInfo().

1738 {
1740 
1741  const std::string layerName("prelu");
1742 
1743  armnn::TensorInfo inputTensorInfo ({ 4, 1, 2 }, armnn::DataType::Float32);
1744  armnn::TensorInfo alphaTensorInfo ({ 5, 4, 3, 1 }, armnn::DataType::Float32);
1745  armnn::TensorInfo outputTensorInfo({ 5, 4, 3, 2 }, armnn::DataType::Float32);
1746 
1748  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
1749  armnn::IConnectableLayer* const alphaLayer = network->AddInputLayer(1);
1750  armnn::IConnectableLayer* const preluLayer = network->AddPreluLayer(layerName.c_str());
1751  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
1752 
1753  inputLayer->GetOutputSlot(0).Connect(preluLayer->GetInputSlot(0));
1754  alphaLayer->GetOutputSlot(0).Connect(preluLayer->GetInputSlot(1));
1755  preluLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
1756 
1757  inputLayer->GetOutputSlot(0).SetTensorInfo(inputTensorInfo);
1758  alphaLayer->GetOutputSlot(0).SetTensorInfo(alphaTensorInfo);
1759  preluLayer->GetOutputSlot(0).SetTensorInfo(outputTensorInfo);
1760 
1761  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
1762  BOOST_CHECK(deserializedNetwork);
1763 
1764  PreluLayerVerifier verifier(layerName, {inputTensorInfo, alphaTensorInfo}, {outputTensorInfo});
1765  deserializedNetwork->Accept(verifier);
1766 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
#define DECLARE_LAYER_VERIFIER_CLASS(name)
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [33/60]

BOOST_AUTO_TEST_CASE ( SerializeNormalization  )

Definition at line 1768 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), NormalizationDescriptor::m_DataLayout, armnn::NCHW, armnn::Pad(), and IOutputSlot::SetTensorInfo().

1769 {
1771 
1772  const std::string layerName("normalization");
1773  const armnn::TensorInfo info({2, 1, 2, 2}, armnn::DataType::Float32);
1774 
1777  desc.m_NormSize = 3;
1778  desc.m_Alpha = 1;
1779  desc.m_Beta = 1;
1780  desc.m_K = 1;
1781 
1783  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
1784  armnn::IConnectableLayer* const normalizationLayer = network->AddNormalizationLayer(desc, layerName.c_str());
1785  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
1786 
1787  inputLayer->GetOutputSlot(0).Connect(normalizationLayer->GetInputSlot(0));
1788  normalizationLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
1789 
1790  inputLayer->GetOutputSlot(0).SetTensorInfo(info);
1791  normalizationLayer->GetOutputSlot(0).SetTensorInfo(info);
1792 
1793  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
1794  BOOST_CHECK(deserializedNetwork);
1795 
1796  NormalizationLayerVerifier verifier(layerName, {info}, {info}, desc);
1797  deserializedNetwork->Accept(verifier);
1798 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
#define DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR(name)
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
A NormalizationDescriptor for the NormalizationLayer.
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [34/60]

BOOST_AUTO_TEST_CASE ( SerializePad  )

Definition at line 1802 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), and IOutputSlot::SetTensorInfo().

1803 {
1804  const std::string layerName("pad");
1805  const armnn::TensorInfo inputTensorInfo = armnn::TensorInfo({1, 2, 3, 4}, armnn::DataType::Float32);
1806  const armnn::TensorInfo outputTensorInfo = armnn::TensorInfo({1, 3, 5, 7}, armnn::DataType::Float32);
1807 
1808  armnn::PadDescriptor desc({{0, 0}, {1, 0}, {1, 1}, {1, 2}});
1809 
1811  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
1812  armnn::IConnectableLayer* const padLayer = network->AddPadLayer(desc, layerName.c_str());
1813  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
1814 
1815  inputLayer->GetOutputSlot(0).Connect(padLayer->GetInputSlot(0));
1816  padLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
1817 
1818  inputLayer->GetOutputSlot(0).SetTensorInfo(inputTensorInfo);
1819  padLayer->GetOutputSlot(0).SetTensorInfo(outputTensorInfo);
1820 
1821  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
1822  BOOST_CHECK(deserializedNetwork);
1823 
1824  PadLayerVerifier verifier(layerName, {inputTensorInfo}, {outputTensorInfo}, desc);
1825  deserializedNetwork->Accept(verifier);
1826 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
A PadDescriptor for the PadLayer.
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [35/60]

BOOST_AUTO_TEST_CASE ( EnsurePadBackwardCompatibility  )

Definition at line 1828 of file SerializerTests.cpp.

References BOOST_CHECK(), and armnn::Float32.

1829 {
1830  // The PadDescriptor is being extended with a float PadValue (so a value other than 0
1831  // can be used to pad the tensor.
1832  //
1833  // This test contains a binary representation of a simple input->pad->output network
1834  // prior to this change to test that the descriptor has been updated in a backward
1835  // compatible way with respect to Deserialization of older binary dumps
1836  const std::vector<uint8_t> padModel =
1837  {
1838  0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x10, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x0A, 0x00,
1839  0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
1840  0x54, 0x01, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
1841  0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xD0, 0xFE, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x0B,
1842  0x04, 0x00, 0x00, 0x00, 0x96, 0xFF, 0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0x9E, 0xFF, 0xFF, 0xFF, 0x04, 0x00,
1843  0x00, 0x00, 0x72, 0xFF, 0xFF, 0xFF, 0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
1844  0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
1845  0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2C, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00,
1846  0x00, 0x00, 0x00, 0x00, 0x24, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x16, 0x0C, 0x00, 0x00, 0x00, 0x08, 0x00,
1847  0x0E, 0x00, 0x04, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x4C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00,
1848  0x00, 0x00, 0x06, 0x00, 0x08, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00,
1849  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1850  0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
1851  0x0E, 0x00, 0x18, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x10, 0x00, 0x14, 0x00, 0x0E, 0x00, 0x00, 0x00,
1852  0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x14, 0x00,
1853  0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x70, 0x61, 0x64, 0x00, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,
1854  0x01, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x00,
1855  0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x52, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00,
1856  0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00,
1857  0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00,
1858  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x07, 0x00, 0x08, 0x00, 0x08, 0x00,
1859  0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xF6, 0xFF, 0xFF, 0xFF, 0x0C, 0x00, 0x00, 0x00,
1860  0x00, 0x00, 0x06, 0x00, 0x0A, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00,
1861  0x0E, 0x00, 0x14, 0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x10, 0x00, 0x0E, 0x00, 0x00, 0x00,
1862  0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
1863  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00,
1864  0x08, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
1865  0x0A, 0x00, 0x10, 0x00, 0x08, 0x00, 0x07, 0x00, 0x0C, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
1866  0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00,
1867  0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00
1868  };
1869 
1870  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(std::string(padModel.begin(), padModel.end()));
1871  BOOST_CHECK(deserializedNetwork);
1872 
1873  const armnn::TensorInfo inputInfo = armnn::TensorInfo({ 1, 2, 3, 4 }, armnn::DataType::Float32);
1874  const armnn::TensorInfo outputInfo = armnn::TensorInfo({ 1, 3, 5, 7 }, armnn::DataType::Float32);
1875 
1876  armnn::PadDescriptor descriptor({{ 0, 0 }, { 1, 0 }, { 1, 1 }, { 1, 2 }});
1877 
1878  PadLayerVerifier verifier("pad", { inputInfo }, { outputInfo }, descriptor);
1879  deserializedNetwork->Accept(verifier);
1880 }
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
A PadDescriptor for the PadLayer.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101

◆ BOOST_AUTO_TEST_CASE() [36/60]

BOOST_AUTO_TEST_CASE ( SerializePermute  )

Definition at line 1882 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), armnnUtils::Permute(), and IOutputSlot::SetTensorInfo().

1883 {
1885 
1886  const std::string layerName("permute");
1887  const armnn::TensorInfo inputTensorInfo({4, 3, 2, 1}, armnn::DataType::Float32);
1888  const armnn::TensorInfo outputTensorInfo({1, 2, 3, 4}, armnn::DataType::Float32);
1889 
1890  armnn::PermuteDescriptor descriptor(armnn::PermutationVector({3, 2, 1, 0}));
1891 
1893  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
1894  armnn::IConnectableLayer* const permuteLayer = network->AddPermuteLayer(descriptor, layerName.c_str());
1895  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
1896 
1897  inputLayer->GetOutputSlot(0).Connect(permuteLayer->GetInputSlot(0));
1898  permuteLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
1899 
1900  inputLayer->GetOutputSlot(0).SetTensorInfo(inputTensorInfo);
1901  permuteLayer->GetOutputSlot(0).SetTensorInfo(outputTensorInfo);
1902 
1903  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
1904  BOOST_CHECK(deserializedNetwork);
1905 
1906  PermuteLayerVerifier verifier(layerName, {inputTensorInfo}, {outputTensorInfo}, descriptor);
1907  deserializedNetwork->Accept(verifier);
1908 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
void Permute(const armnn::TensorShape &dstShape, const armnn::PermutationVector &mappings, const void *src, void *dst, size_t dataTypeSize)
Definition: Permute.cpp:121
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
#define DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR(name)
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49
A PermuteDescriptor for the PermuteLayer.

◆ BOOST_AUTO_TEST_CASE() [37/60]

BOOST_AUTO_TEST_CASE ( SerializePooling2d  )

Definition at line 1910 of file SerializerTests.cpp.

References armnn::Average, BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR, armnn::Exclude, armnn::Float32, armnn::Floor, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), Pooling2dDescriptor::m_DataLayout, armnn::NHWC, armnn::Pooling2d(), and IOutputSlot::SetTensorInfo().

1911 {
1913 
1914  const std::string layerName("pooling2d");
1915  const armnn::TensorInfo inputInfo({1, 2, 2, 1}, armnn::DataType::Float32);
1916  const armnn::TensorInfo outputInfo({1, 1, 1, 1}, armnn::DataType::Float32);
1917 
1920  desc.m_PadTop = 0;
1921  desc.m_PadBottom = 0;
1922  desc.m_PadLeft = 0;
1923  desc.m_PadRight = 0;
1924  desc.m_PoolType = armnn::PoolingAlgorithm::Average;
1925  desc.m_OutputShapeRounding = armnn::OutputShapeRounding::Floor;
1926  desc.m_PaddingMethod = armnn::PaddingMethod::Exclude;
1927  desc.m_PoolHeight = 2;
1928  desc.m_PoolWidth = 2;
1929  desc.m_StrideX = 2;
1930  desc.m_StrideY = 2;
1931 
1933  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
1934  armnn::IConnectableLayer* const pooling2dLayer = network->AddPooling2dLayer(desc, layerName.c_str());
1935  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
1936 
1937  inputLayer->GetOutputSlot(0).Connect(pooling2dLayer->GetInputSlot(0));
1938  pooling2dLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
1939 
1940  inputLayer->GetOutputSlot(0).SetTensorInfo(inputInfo);
1941  pooling2dLayer->GetOutputSlot(0).SetTensorInfo(outputInfo);
1942 
1943  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
1944  BOOST_CHECK(deserializedNetwork);
1945 
1946  Pooling2dLayerVerifier verifier(layerName, {inputInfo}, {outputInfo}, desc);
1947  deserializedNetwork->Accept(verifier);
1948 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
The padding fields don&#39;t count and are ignored.
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
#define DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR(name)
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
A Pooling2dDescriptor for the Pooling2dLayer.
void Pooling2d(Decoder< float > &rInputDecoder, Encoder< float > &rOutputEncoder, const TensorInfo &inputInfo, const TensorInfo &outputInfo, const Pooling2dDescriptor &params)
Computes the Pooling2d operation.
Definition: Pooling2d.cpp:143
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [38/60]

BOOST_AUTO_TEST_CASE ( SerializeQuantize  )

Definition at line 1950 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), armnn::Quantize(), and IOutputSlot::SetTensorInfo().

1951 {
1953 
1954  const std::string layerName("quantize");
1955  const armnn::TensorInfo info({ 1, 2, 2, 3 }, armnn::DataType::Float32);
1956 
1958  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
1959  armnn::IConnectableLayer* const quantizeLayer = network->AddQuantizeLayer(layerName.c_str());
1960  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
1961 
1962  inputLayer->GetOutputSlot(0).Connect(quantizeLayer->GetInputSlot(0));
1963  quantizeLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
1964 
1965  inputLayer->GetOutputSlot(0).SetTensorInfo(info);
1966  quantizeLayer->GetOutputSlot(0).SetTensorInfo(info);
1967 
1968  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
1969  BOOST_CHECK(deserializedNetwork);
1970 
1971  QuantizeLayerVerifier verifier(layerName, {info}, {info});
1972  deserializedNetwork->Accept(verifier);
1973 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
#define DECLARE_LAYER_VERIFIER_CLASS(name)
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
QuantizedType Quantize(float value, float scale, int32_t offset)
Quantize a floating point data type into an 8-bit data type.
Definition: TypesUtils.cpp:31
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [39/60]

BOOST_AUTO_TEST_CASE ( SerializeReshape  )

Definition at line 1975 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), and IOutputSlot::SetTensorInfo().

1976 {
1978 
1979  const std::string layerName("reshape");
1980  const armnn::TensorInfo inputInfo({1, 9}, armnn::DataType::Float32);
1981  const armnn::TensorInfo outputInfo({3, 3}, armnn::DataType::Float32);
1982 
1983  armnn::ReshapeDescriptor descriptor({3, 3});
1984 
1986  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
1987  armnn::IConnectableLayer* const reshapeLayer = network->AddReshapeLayer(descriptor, layerName.c_str());
1988  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
1989 
1990  inputLayer->GetOutputSlot(0).Connect(reshapeLayer->GetInputSlot(0));
1991  reshapeLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
1992 
1993  inputLayer->GetOutputSlot(0).SetTensorInfo(inputInfo);
1994  reshapeLayer->GetOutputSlot(0).SetTensorInfo(outputInfo);
1995 
1996  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
1997  BOOST_CHECK(deserializedNetwork);
1998 
1999  ReshapeLayerVerifier verifier(layerName, {inputInfo}, {outputInfo}, descriptor);
2000  deserializedNetwork->Accept(verifier);
2001 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
A ReshapeDescriptor for the ReshapeLayer.
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
#define DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR(name)
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [40/60]

BOOST_AUTO_TEST_CASE ( SerializeResize  )

Definition at line 2003 of file SerializerTests.cpp.

References armnn::Bilinear, BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), ResizeDescriptor::m_DataLayout, ResizeDescriptor::m_Method, ResizeDescriptor::m_TargetHeight, ResizeDescriptor::m_TargetWidth, armnn::NearestNeighbor, armnn::Resize(), and IOutputSlot::SetTensorInfo().

2004 {
2006 
2007  const std::string layerName("resize");
2008  const armnn::TensorInfo inputInfo = armnn::TensorInfo({1, 3, 5, 5}, armnn::DataType::Float32);
2009  const armnn::TensorInfo outputInfo = armnn::TensorInfo({1, 3, 2, 4}, armnn::DataType::Float32);
2010 
2012  desc.m_TargetWidth = 4;
2013  desc.m_TargetHeight = 2;
2014  desc.m_Method = armnn::ResizeMethod::NearestNeighbor;
2015 
2017  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
2018  armnn::IConnectableLayer* const resizeLayer = network->AddResizeLayer(desc, layerName.c_str());
2019  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
2020 
2021  inputLayer->GetOutputSlot(0).Connect(resizeLayer->GetInputSlot(0));
2022  resizeLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
2023 
2024  inputLayer->GetOutputSlot(0).SetTensorInfo(inputInfo);
2025  resizeLayer->GetOutputSlot(0).SetTensorInfo(outputInfo);
2026 
2027  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
2028  BOOST_CHECK(deserializedNetwork);
2029 
2030  ResizeLayerVerifier verifier(layerName, {inputInfo}, {outputInfo}, desc);
2031  deserializedNetwork->Accept(verifier);
2032 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
A ResizeDescriptor for the ResizeLayer.
uint32_t m_TargetWidth
Target width value.
void Resize(Decoder< float > &in, const TensorInfo &inputInfo, Encoder< float > &out, const TensorInfo &outputInfo, DataLayoutIndexed dataLayout, armnn::ResizeMethod resizeMethod, bool alignCorners)
Definition: Resize.cpp:35
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
#define DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR(name)
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [41/60]

BOOST_AUTO_TEST_CASE ( SerializeResizeBilinear  )

Definition at line 2067 of file SerializerTests.cpp.

References ARMNN_NO_DEPRECATE_WARN_BEGIN, ARMNN_NO_DEPRECATE_WARN_END, BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), armnn::Float32, IConnectableLayer::GetOutputSlot(), ResizeBilinearDescriptor::m_TargetWidth, and IOutputSlot::SetTensorInfo().

2068 {
2069  const std::string layerName("resizeBilinear");
2070  const armnn::TensorInfo inputInfo = armnn::TensorInfo({1, 3, 5, 5}, armnn::DataType::Float32);
2071  const armnn::TensorInfo outputInfo = armnn::TensorInfo({1, 3, 2, 4}, armnn::DataType::Float32);
2072 
2074  desc.m_TargetWidth = 4u;
2075  desc.m_TargetHeight = 2u;
2076 
2078  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
2080  armnn::IConnectableLayer* const resizeLayer = network->AddResizeBilinearLayer(desc, layerName.c_str());
2082  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
2083 
2084  inputLayer->GetOutputSlot(0).Connect(resizeLayer->GetInputSlot(0));
2085  resizeLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
2086 
2087  inputLayer->GetOutputSlot(0).SetTensorInfo(inputInfo);
2088  resizeLayer->GetOutputSlot(0).SetTensorInfo(outputInfo);
2089 
2090  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
2091  BOOST_CHECK(deserializedNetwork);
2092 
2093  ResizeBilinearLayerVerifier verifier(layerName, {inputInfo}, {outputInfo}, desc);
2094  deserializedNetwork->Accept(verifier);
2095 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
#define ARMNN_NO_DEPRECATE_WARN_BEGIN
Definition: Deprecated.hpp:33
uint32_t m_TargetWidth
Target width value.
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
#define ARMNN_NO_DEPRECATE_WARN_END
Definition: Deprecated.hpp:34
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
A ResizeBilinearDescriptor for the ResizeBilinearLayer.
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [42/60]

BOOST_AUTO_TEST_CASE ( EnsureResizeBilinearBackwardCompatibility  )

Definition at line 2097 of file SerializerTests.cpp.

References BOOST_CHECK(), armnn::Float32, and ResizeBilinearDescriptor::m_TargetWidth.

2098 {
2099  // The hex data below is a flat buffer containing a simple network with an input,
2100  // a ResizeBilinearLayer (now deprecated) and an output
2101  //
2102  // This test verifies that we can still deserialize this old-style model by replacing
2103  // the ResizeBilinearLayer with an equivalent ResizeLayer
2104  const std::vector<uint8_t> resizeBilinearModel =
2105  {
2106  0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x10, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x0A, 0x00,
2107  0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
2108  0x50, 0x01, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
2109  0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xD4, 0xFE, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x0B,
2110  0x04, 0x00, 0x00, 0x00, 0xC2, 0xFE, 0xFF, 0xFF, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x08, 0x00,
2111  0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x8A, 0xFF, 0xFF, 0xFF, 0x02, 0x00, 0x00, 0x00,
2112  0x10, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00,
2113  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2114  0x38, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
2115  0x00, 0x1A, 0x0C, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0E, 0x00, 0x04, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00,
2116  0x34, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x12, 0x00, 0x08, 0x00, 0x0C, 0x00,
2117  0x07, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
2118  0x00, 0x00, 0x0E, 0x00, 0x18, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x10, 0x00, 0x14, 0x00, 0x0E, 0x00,
2119  0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00,
2120  0x20, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x72, 0x65, 0x73, 0x69, 0x7A, 0x65, 0x42, 0x69, 0x6C, 0x69,
2121  0x6E, 0x65, 0x61, 0x72, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
2122  0x0C, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00,
2123  0x00, 0x00, 0x52, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2124  0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00,
2125  0x00, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2126  0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x07, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
2127  0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0xF6, 0xFF, 0xFF, 0xFF, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
2128  0x0A, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x14, 0x00,
2129  0x00, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x10, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
2130  0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2131  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0A, 0x00,
2132  0x00, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x10, 0x00,
2133  0x08, 0x00, 0x07, 0x00, 0x0C, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00,
2134  0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00,
2135  0x00, 0x00, 0x05, 0x00, 0x00, 0x00
2136  };
2137 
2138  armnn::INetworkPtr deserializedNetwork =
2139  DeserializeNetwork(std::string(resizeBilinearModel.begin(), resizeBilinearModel.end()));
2140  BOOST_CHECK(deserializedNetwork);
2141 
2142  const armnn::TensorInfo inputInfo = armnn::TensorInfo({1, 3, 5, 5}, armnn::DataType::Float32);
2143  const armnn::TensorInfo outputInfo = armnn::TensorInfo({1, 3, 2, 4}, armnn::DataType::Float32);
2144 
2146  descriptor.m_TargetWidth = 4u;
2147  descriptor.m_TargetHeight = 2u;
2148 
2149  ResizeBilinearLayerVerifier verifier("resizeBilinear", { inputInfo }, { outputInfo }, descriptor);
2150  deserializedNetwork->Accept(verifier);
2151 }
uint32_t m_TargetWidth
Target width value.
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
A ResizeBilinearDescriptor for the ResizeBilinearLayer.

◆ BOOST_AUTO_TEST_CASE() [43/60]

BOOST_AUTO_TEST_CASE ( SerializeSlice  )

Definition at line 2153 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), IOutputSlot::SetTensorInfo(), and armnn::Slice().

2154 {
2156 
2157  const std::string layerName{"slice"};
2158 
2159  const armnn::TensorInfo inputInfo = armnn::TensorInfo({3, 2, 3, 1}, armnn::DataType::Float32);
2160  const armnn::TensorInfo outputInfo = armnn::TensorInfo({2, 2, 2, 1}, armnn::DataType::Float32);
2161 
2162  armnn::SliceDescriptor descriptor({ 0, 0, 1, 0}, {2, 2, 2, 1});
2163 
2165 
2166  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
2167  armnn::IConnectableLayer* const sliceLayer = network->AddSliceLayer(descriptor, layerName.c_str());
2168  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
2169 
2170  inputLayer->GetOutputSlot(0).Connect(sliceLayer->GetInputSlot(0));
2171  sliceLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
2172 
2173  inputLayer->GetOutputSlot(0).SetTensorInfo(inputInfo);
2174  sliceLayer->GetOutputSlot(0).SetTensorInfo(outputInfo);
2175 
2176  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
2177  BOOST_CHECK(deserializedNetwork);
2178 
2179  SliceLayerVerifier verifier(layerName, {inputInfo}, {outputInfo}, descriptor);
2180  deserializedNetwork->Accept(verifier);
2181 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
void Slice(const TensorInfo &inputInfo, const SliceDescriptor &descriptor, const void *inputData, void *outputData, unsigned int dataTypeSize)
Definition: Slice.cpp:16
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
A SliceDescriptor for the SliceLayer.
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
#define DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR(name)
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [44/60]

BOOST_AUTO_TEST_CASE ( SerializeSoftmax  )

Definition at line 2183 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), SoftmaxDescriptor::m_Beta, IOutputSlot::SetTensorInfo(), and armnn::Softmax().

2184 {
2186 
2187  const std::string layerName("softmax");
2189 
2190  armnn::SoftmaxDescriptor descriptor;
2191  descriptor.m_Beta = 1.0f;
2192 
2194  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
2195  armnn::IConnectableLayer* const softmaxLayer = network->AddSoftmaxLayer(descriptor, layerName.c_str());
2196  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
2197 
2198  inputLayer->GetOutputSlot(0).Connect(softmaxLayer->GetInputSlot(0));
2199  softmaxLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
2200 
2201  inputLayer->GetOutputSlot(0).SetTensorInfo(info);
2202  softmaxLayer->GetOutputSlot(0).SetTensorInfo(info);
2203 
2204  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
2205  BOOST_CHECK(deserializedNetwork);
2206 
2207  SoftmaxLayerVerifier verifier(layerName, {info}, {info}, descriptor);
2208  deserializedNetwork->Accept(verifier);
2209 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
float m_Beta
Exponentiation value.
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
#define DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR(name)
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
void Softmax(Decoder< float > &in, Encoder< float > &out, const TensorInfo &inputTensorInfo, float beta, int axis)
Computes the softmax function on some inputs, into outputs, with a shape given by tensorInfo...
Definition: Softmax.cpp:17
A SoftmaxDescriptor for the SoftmaxLayer.
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [45/60]

BOOST_AUTO_TEST_CASE ( SerializeSpaceToBatchNd  )

Definition at line 2211 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), SpaceToBatchNdDescriptor::m_DataLayout, armnn::NCHW, IOutputSlot::SetTensorInfo(), and armnn::SpaceToBatchNd().

2212 {
2214 
2215  const std::string layerName("spaceToBatchNd");
2216  const armnn::TensorInfo inputInfo({2, 1, 2, 4}, armnn::DataType::Float32);
2217  const armnn::TensorInfo outputInfo({8, 1, 1, 3}, armnn::DataType::Float32);
2218 
2221  desc.m_BlockShape = {2, 2};
2222  desc.m_PadList = {{0, 0}, {2, 0}};
2223 
2225  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
2226  armnn::IConnectableLayer* const spaceToBatchNdLayer = network->AddSpaceToBatchNdLayer(desc, layerName.c_str());
2227  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
2228 
2229  inputLayer->GetOutputSlot(0).Connect(spaceToBatchNdLayer->GetInputSlot(0));
2230  spaceToBatchNdLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
2231 
2232  inputLayer->GetOutputSlot(0).SetTensorInfo(inputInfo);
2233  spaceToBatchNdLayer->GetOutputSlot(0).SetTensorInfo(outputInfo);
2234 
2235  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
2236  BOOST_CHECK(deserializedNetwork);
2237 
2238  SpaceToBatchNdLayerVerifier verifier(layerName, {inputInfo}, {outputInfo}, desc);
2239  deserializedNetwork->Accept(verifier);
2240 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
DataLayout m_DataLayout
The data layout to be used (NCHW, NHWC).
void SpaceToBatchNd(const TensorInfo &inputInfo, const TensorInfo &outputInfo, const SpaceToBatchNdDescriptor &params, Decoder< float > &inputData, Encoder< float > &outputData)
A SpaceToBatchNdDescriptor for the SpaceToBatchNdLayer.
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
#define DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR(name)
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [46/60]

BOOST_AUTO_TEST_CASE ( SerializeSpaceToDepth  )

Definition at line 2242 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), SpaceToDepthDescriptor::m_BlockSize, armnn::NHWC, IOutputSlot::SetTensorInfo(), and armnn::SpaceToDepth().

2243 {
2245 
2246  const std::string layerName("spaceToDepth");
2247 
2248  const armnn::TensorInfo inputInfo ({ 1, 16, 8, 3 }, armnn::DataType::Float32);
2249  const armnn::TensorInfo outputInfo({ 1, 8, 4, 12 }, armnn::DataType::Float32);
2250 
2252  desc.m_BlockSize = 2;
2253  desc.m_DataLayout = armnn::DataLayout::NHWC;
2254 
2256  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
2257  armnn::IConnectableLayer* const spaceToDepthLayer = network->AddSpaceToDepthLayer(desc, layerName.c_str());
2258  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
2259 
2260  inputLayer->GetOutputSlot(0).Connect(spaceToDepthLayer->GetInputSlot(0));
2261  spaceToDepthLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
2262 
2263  inputLayer->GetOutputSlot(0).SetTensorInfo(inputInfo);
2264  spaceToDepthLayer->GetOutputSlot(0).SetTensorInfo(outputInfo);
2265 
2266  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
2267  BOOST_CHECK(deserializedNetwork);
2268 
2269  SpaceToDepthLayerVerifier verifier(layerName, {inputInfo}, {outputInfo}, desc);
2270  deserializedNetwork->Accept(verifier);
2271 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
A SpaceToDepthDescriptor for the SpaceToDepthLayer.
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
unsigned int m_BlockSize
Scalar specifying the input block size. It must be >= 1.
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
void SpaceToDepth(const TensorInfo &inputInfo, const TensorInfo &outputInfo, const SpaceToDepthDescriptor &params, Decoder< float > &inputData, Encoder< float > &outputData)
#define DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR(name)
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [47/60]

BOOST_AUTO_TEST_CASE ( SerializeSplitter  )

Definition at line 2273 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), IOutputSlot::SetTensorInfo(), ViewsDescriptor::SetViewOriginCoord(), ViewsDescriptor::SetViewSize(), and armnn::Splitter().

2274 {
2276 
2277  const unsigned int numViews = 3;
2278  const unsigned int numDimensions = 4;
2279  const unsigned int inputShape[] = {1, 18, 4, 4};
2280  const unsigned int outputShape[] = {1, 6, 4, 4};
2281 
2282  // This is modelled on how the caffe parser sets up a splitter layer to partition an input along dimension one.
2283  unsigned int splitterDimSizes[4] = {static_cast<unsigned int>(inputShape[0]),
2284  static_cast<unsigned int>(inputShape[1]),
2285  static_cast<unsigned int>(inputShape[2]),
2286  static_cast<unsigned int>(inputShape[3])};
2287  splitterDimSizes[1] /= numViews;
2288  armnn::ViewsDescriptor desc(numViews, numDimensions);
2289 
2290  for (unsigned int g = 0; g < numViews; ++g)
2291  {
2292  desc.SetViewOriginCoord(g, 1, splitterDimSizes[1] * g);
2293 
2294  for (unsigned int dimIdx=0; dimIdx < 4; dimIdx++)
2295  {
2296  desc.SetViewSize(g, dimIdx, splitterDimSizes[dimIdx]);
2297  }
2298  }
2299 
2300  const std::string layerName("splitter");
2301  const armnn::TensorInfo inputInfo(numDimensions, inputShape, armnn::DataType::Float32);
2302  const armnn::TensorInfo outputInfo(numDimensions, outputShape, armnn::DataType::Float32);
2303 
2305  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
2306  armnn::IConnectableLayer* const splitterLayer = network->AddSplitterLayer(desc, layerName.c_str());
2307  armnn::IConnectableLayer* const outputLayer0 = network->AddOutputLayer(0);
2308  armnn::IConnectableLayer* const outputLayer1 = network->AddOutputLayer(1);
2309  armnn::IConnectableLayer* const outputLayer2 = network->AddOutputLayer(2);
2310 
2311  inputLayer->GetOutputSlot(0).Connect(splitterLayer->GetInputSlot(0));
2312  splitterLayer->GetOutputSlot(0).Connect(outputLayer0->GetInputSlot(0));
2313  splitterLayer->GetOutputSlot(1).Connect(outputLayer1->GetInputSlot(0));
2314  splitterLayer->GetOutputSlot(2).Connect(outputLayer2->GetInputSlot(0));
2315 
2316  inputLayer->GetOutputSlot(0).SetTensorInfo(inputInfo);
2317  splitterLayer->GetOutputSlot(0).SetTensorInfo(outputInfo);
2318  splitterLayer->GetOutputSlot(1).SetTensorInfo(outputInfo);
2319  splitterLayer->GetOutputSlot(2).SetTensorInfo(outputInfo);
2320 
2321  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
2322  BOOST_CHECK(deserializedNetwork);
2323 
2324  SplitterLayerVerifier verifier(layerName, {inputInfo}, {outputInfo, outputInfo, outputInfo}, desc);
2325  deserializedNetwork->Accept(verifier);
2326 }
A ViewsDescriptor for the SplitterLayer.
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
#define DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR(name)
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
void Splitter(const SplitterQueueDescriptor &data)
Definition: Splitter.hpp:17
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [48/60]

BOOST_AUTO_TEST_CASE ( SerializeStack  )

Definition at line 2328 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), IOutputSlot::SetTensorInfo(), and armnn::Stack().

2329 {
2331 
2332  const std::string layerName("stack");
2333 
2334  armnn::TensorInfo inputTensorInfo ({4, 3, 5}, armnn::DataType::Float32);
2335  armnn::TensorInfo outputTensorInfo({4, 3, 2, 5}, armnn::DataType::Float32);
2336 
2337  armnn::StackDescriptor descriptor(2, 2, {4, 3, 5});
2338 
2340  armnn::IConnectableLayer* const inputLayer1 = network->AddInputLayer(0);
2341  armnn::IConnectableLayer* const inputLayer2 = network->AddInputLayer(1);
2342  armnn::IConnectableLayer* const stackLayer = network->AddStackLayer(descriptor, layerName.c_str());
2343  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
2344 
2345  inputLayer1->GetOutputSlot(0).Connect(stackLayer->GetInputSlot(0));
2346  inputLayer2->GetOutputSlot(0).Connect(stackLayer->GetInputSlot(1));
2347  stackLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
2348 
2349  inputLayer1->GetOutputSlot(0).SetTensorInfo(inputTensorInfo);
2350  inputLayer2->GetOutputSlot(0).SetTensorInfo(inputTensorInfo);
2351  stackLayer->GetOutputSlot(0).SetTensorInfo(outputTensorInfo);
2352 
2353  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
2354  BOOST_CHECK(deserializedNetwork);
2355 
2356  StackLayerVerifier verifier(layerName, {inputTensorInfo, inputTensorInfo}, {outputTensorInfo}, descriptor);
2357  deserializedNetwork->Accept(verifier);
2358 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
void Stack(const StackQueueDescriptor &data, std::vector< std::unique_ptr< Decoder< float >>> &inputs, Encoder< float > &output)
Definition: Stack.cpp:12
A StackDescriptor for the StackLayer.
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
#define DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR(name)
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [49/60]

BOOST_AUTO_TEST_CASE ( SerializeStandIn  )

Definition at line 2360 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), and IOutputSlot::SetTensorInfo().

2361 {
2363 
2364  const std::string layerName("standIn");
2365 
2366  armnn::TensorInfo tensorInfo({ 1u }, armnn::DataType::Float32);
2367  armnn::StandInDescriptor descriptor(2u, 2u);
2368 
2370  armnn::IConnectableLayer* const inputLayer0 = network->AddInputLayer(0);
2371  armnn::IConnectableLayer* const inputLayer1 = network->AddInputLayer(1);
2372  armnn::IConnectableLayer* const standInLayer = network->AddStandInLayer(descriptor, layerName.c_str());
2373  armnn::IConnectableLayer* const outputLayer0 = network->AddOutputLayer(0);
2374  armnn::IConnectableLayer* const outputLayer1 = network->AddOutputLayer(1);
2375 
2376  inputLayer0->GetOutputSlot(0).Connect(standInLayer->GetInputSlot(0));
2377  inputLayer0->GetOutputSlot(0).SetTensorInfo(tensorInfo);
2378 
2379  inputLayer1->GetOutputSlot(0).Connect(standInLayer->GetInputSlot(1));
2380  inputLayer1->GetOutputSlot(0).SetTensorInfo(tensorInfo);
2381 
2382  standInLayer->GetOutputSlot(0).Connect(outputLayer0->GetInputSlot(0));
2383  standInLayer->GetOutputSlot(0).SetTensorInfo(tensorInfo);
2384 
2385  standInLayer->GetOutputSlot(1).Connect(outputLayer1->GetInputSlot(0));
2386  standInLayer->GetOutputSlot(1).SetTensorInfo(tensorInfo);
2387 
2388  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
2389  BOOST_CHECK(deserializedNetwork);
2390 
2391  StandInLayerVerifier verifier(layerName, { tensorInfo, tensorInfo }, { tensorInfo, tensorInfo }, descriptor);
2392  deserializedNetwork->Accept(verifier);
2393 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
A StandInDescriptor for the StandIn layer.
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
#define DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR(name)
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [50/60]

BOOST_AUTO_TEST_CASE ( SerializeStridedSlice  )

Definition at line 2395 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), StridedSliceDescriptor::m_EndMask, armnn::NCHW, IOutputSlot::SetTensorInfo(), and armnn::StridedSlice().

2396 {
2398 
2399  const std::string layerName("stridedSlice");
2400  const armnn::TensorInfo inputInfo = armnn::TensorInfo({3, 2, 3, 1}, armnn::DataType::Float32);
2401  const armnn::TensorInfo outputInfo = armnn::TensorInfo({3, 1}, armnn::DataType::Float32);
2402 
2403  armnn::StridedSliceDescriptor desc({0, 0, 1, 0}, {1, 1, 1, 1}, {1, 1, 1, 1});
2404  desc.m_EndMask = (1 << 4) - 1;
2405  desc.m_ShrinkAxisMask = (1 << 1) | (1 << 2);
2406  desc.m_DataLayout = armnn::DataLayout::NCHW;
2407 
2409  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
2410  armnn::IConnectableLayer* const stridedSliceLayer = network->AddStridedSliceLayer(desc, layerName.c_str());
2411  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
2412 
2413  inputLayer->GetOutputSlot(0).Connect(stridedSliceLayer->GetInputSlot(0));
2414  stridedSliceLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
2415 
2416  inputLayer->GetOutputSlot(0).SetTensorInfo(inputInfo);
2417  stridedSliceLayer->GetOutputSlot(0).SetTensorInfo(outputInfo);
2418 
2419  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
2420  BOOST_CHECK(deserializedNetwork);
2421 
2422  StridedSliceLayerVerifier verifier(layerName, {inputInfo}, {outputInfo}, desc);
2423  deserializedNetwork->Accept(verifier);
2424 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
int32_t m_EndMask
End mask value.
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
void StridedSlice(const TensorInfo &inputInfo, const StridedSliceDescriptor &params, const void *inputData, void *outputData, unsigned int dataTypeSize)
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
A StridedSliceDescriptor for the StridedSliceLayer.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
#define DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR(name)
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [51/60]

BOOST_AUTO_TEST_CASE ( SerializeSubtraction  )

Definition at line 2426 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), and IOutputSlot::SetTensorInfo().

2427 {
2428  DECLARE_LAYER_VERIFIER_CLASS(Subtraction)
2429 
2430  const std::string layerName("subtraction");
2432 
2434  armnn::IConnectableLayer* const inputLayer0 = network->AddInputLayer(0);
2435  armnn::IConnectableLayer* const inputLayer1 = network->AddInputLayer(1);
2436  armnn::IConnectableLayer* const subtractionLayer = network->AddSubtractionLayer(layerName.c_str());
2437  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
2438 
2439  inputLayer0->GetOutputSlot(0).Connect(subtractionLayer->GetInputSlot(0));
2440  inputLayer1->GetOutputSlot(0).Connect(subtractionLayer->GetInputSlot(1));
2441  subtractionLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
2442 
2443  inputLayer0->GetOutputSlot(0).SetTensorInfo(info);
2444  inputLayer1->GetOutputSlot(0).SetTensorInfo(info);
2445  subtractionLayer->GetOutputSlot(0).SetTensorInfo(info);
2446 
2447  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
2448  BOOST_CHECK(deserializedNetwork);
2449 
2450  SubtractionLayerVerifier verifier(layerName, {info, info}, {info});
2451  deserializedNetwork->Accept(verifier);
2452 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
#define DECLARE_LAYER_VERIFIER_CLASS(name)
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [52/60]

BOOST_AUTO_TEST_CASE ( SerializeSwitch  )

Definition at line 2454 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), and IOutputSlot::SetTensorInfo().

2455 {
2456  class SwitchLayerVerifier : public LayerVerifierBase
2457  {
2458  public:
2459  SwitchLayerVerifier(const std::string& layerName,
2460  const std::vector<armnn::TensorInfo>& inputInfos,
2461  const std::vector<armnn::TensorInfo>& outputInfos)
2462  : LayerVerifierBase(layerName, inputInfos, outputInfos) {}
2463 
2464  void VisitSwitchLayer(const armnn::IConnectableLayer* layer, const char* name) override
2465  {
2466  VerifyNameAndConnections(layer, name);
2467  }
2468 
2469  void VisitConstantLayer(const armnn::IConnectableLayer*,
2470  const armnn::ConstTensor&,
2471  const char*) override {}
2472  };
2473 
2474  const std::string layerName("switch");
2476 
2477  std::vector<float> constantData = GenerateRandomData<float>(info.GetNumElements());
2478  armnn::ConstTensor constTensor(info, constantData);
2479 
2481  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
2482  armnn::IConnectableLayer* const constantLayer = network->AddConstantLayer(constTensor, "constant");
2483  armnn::IConnectableLayer* const switchLayer = network->AddSwitchLayer(layerName.c_str());
2484  armnn::IConnectableLayer* const trueOutputLayer = network->AddOutputLayer(0);
2485  armnn::IConnectableLayer* const falseOutputLayer = network->AddOutputLayer(1);
2486 
2487  inputLayer->GetOutputSlot(0).Connect(switchLayer->GetInputSlot(0));
2488  constantLayer->GetOutputSlot(0).Connect(switchLayer->GetInputSlot(1));
2489  switchLayer->GetOutputSlot(0).Connect(trueOutputLayer->GetInputSlot(0));
2490  switchLayer->GetOutputSlot(1).Connect(falseOutputLayer->GetInputSlot(0));
2491 
2492  inputLayer->GetOutputSlot(0).SetTensorInfo(info);
2493  constantLayer->GetOutputSlot(0).SetTensorInfo(info);
2494  switchLayer->GetOutputSlot(0).SetTensorInfo(info);
2495  switchLayer->GetOutputSlot(1).SetTensorInfo(info);
2496 
2497  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
2498  BOOST_CHECK(deserializedNetwork);
2499 
2500  SwitchLayerVerifier verifier(layerName, {info, info}, {info, info});
2501  deserializedNetwork->Accept(verifier);
2502 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
Definition: Tensor.hpp:199
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [53/60]

BOOST_AUTO_TEST_CASE ( SerializeTranspose  )

Definition at line 2504 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR, armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), IOutputSlot::SetTensorInfo(), and armnnUtils::Transpose().

2505 {
2507 
2508  const std::string layerName("transpose");
2509  const armnn::TensorInfo inputTensorInfo({4, 3, 2, 1}, armnn::DataType::Float32);
2510  const armnn::TensorInfo outputTensorInfo({1, 2, 3, 4}, armnn::DataType::Float32);
2511 
2512  armnn::TransposeDescriptor descriptor(armnn::PermutationVector({3, 2, 1, 0}));
2513 
2515  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
2516  armnn::IConnectableLayer* const transposeLayer = network->AddTransposeLayer(descriptor, layerName.c_str());
2517  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
2518 
2519  inputLayer->GetOutputSlot(0).Connect(transposeLayer->GetInputSlot(0));
2520  transposeLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
2521 
2522  inputLayer->GetOutputSlot(0).SetTensorInfo(inputTensorInfo);
2523  transposeLayer->GetOutputSlot(0).SetTensorInfo(outputTensorInfo);
2524 
2525  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
2526  BOOST_CHECK(deserializedNetwork);
2527 
2528  TransposeLayerVerifier verifier(layerName, {inputTensorInfo}, {outputTensorInfo}, descriptor);
2529  deserializedNetwork->Accept(verifier);
2530 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
void Transpose(const armnn::TensorShape &dstShape, const armnn::PermutationVector &mappings, const void *src, void *dst, size_t dataTypeSize)
Definition: Transpose.cpp:120
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
A TransposeDescriptor for the TransposeLayer.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
#define DECLARE_LAYER_VERIFIER_CLASS_WITH_DESCRIPTOR(name)
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [54/60]

BOOST_AUTO_TEST_CASE ( SerializeTransposeConvolution2d  )

Definition at line 2532 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), OptionalBase::has_value(), TransposeConvolution2dDescriptor::m_BiasEnabled, TransposeConvolution2dDescriptor::m_DataLayout, TransposeConvolution2dDescriptor::m_PadBottom, TransposeConvolution2dDescriptor::m_PadLeft, TransposeConvolution2dDescriptor::m_PadRight, TransposeConvolution2dDescriptor::m_PadTop, TransposeConvolution2dDescriptor::m_StrideX, TransposeConvolution2dDescriptor::m_StrideY, armnn::NHWC, IOutputSlot::SetTensorInfo(), and OptionalReferenceSwitch< IsReference, T >::value().

2533 {
2534  using Descriptor = armnn::TransposeConvolution2dDescriptor;
2535  class TransposeConvolution2dLayerVerifier : public LayerVerifierBaseWithDescriptor<Descriptor>
2536  {
2537  public:
2538  TransposeConvolution2dLayerVerifier(const std::string& layerName,
2539  const std::vector<armnn::TensorInfo>& inputInfos,
2540  const std::vector<armnn::TensorInfo>& outputInfos,
2541  const Descriptor& descriptor,
2542  const armnn::ConstTensor& weights,
2544  : LayerVerifierBaseWithDescriptor<Descriptor>(layerName, inputInfos, outputInfos, descriptor)
2545  , m_Weights(weights)
2546  , m_Biases(biases)
2547  {}
2548 
2549  void VisitTransposeConvolution2dLayer(const armnn::IConnectableLayer* layer,
2550  const Descriptor& descriptor,
2551  const armnn::ConstTensor& weights,
2553  const char* name) override
2554  {
2555  VerifyNameAndConnections(layer, name);
2556  VerifyDescriptor(descriptor);
2557 
2558  // check weights
2559  CompareConstTensor(weights, m_Weights);
2560 
2561  // check biases
2562  BOOST_CHECK(biases.has_value() == descriptor.m_BiasEnabled);
2563  BOOST_CHECK(biases.has_value() == m_Biases.has_value());
2564 
2565  if (biases.has_value() && m_Biases.has_value())
2566  {
2567  CompareConstTensor(biases.value(), m_Biases.value());
2568  }
2569  }
2570 
2571  private:
2572  armnn::ConstTensor m_Weights;
2574  };
2575 
2576  const std::string layerName("transposeConvolution2d");
2577  const armnn::TensorInfo inputInfo ({ 1, 7, 7, 1 }, armnn::DataType::Float32);
2578  const armnn::TensorInfo outputInfo({ 1, 9, 9, 1 }, armnn::DataType::Float32);
2579 
2580  const armnn::TensorInfo weightsInfo({ 1, 3, 3, 1 }, armnn::DataType::Float32);
2581  const armnn::TensorInfo biasesInfo ({ 1 }, armnn::DataType::Float32);
2582 
2583  std::vector<float> weightsData = GenerateRandomData<float>(weightsInfo.GetNumElements());
2584  armnn::ConstTensor weights(weightsInfo, weightsData);
2585 
2586  std::vector<float> biasesData = GenerateRandomData<float>(biasesInfo.GetNumElements());
2587  armnn::ConstTensor biases(biasesInfo, biasesData);
2588 
2590  descriptor.m_PadLeft = 1;
2591  descriptor.m_PadRight = 1;
2592  descriptor.m_PadTop = 1;
2593  descriptor.m_PadBottom = 1;
2594  descriptor.m_StrideX = 1;
2595  descriptor.m_StrideY = 1;
2596  descriptor.m_BiasEnabled = true;
2598 
2600  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
2601  armnn::IConnectableLayer* const convLayer =
2602  network->AddTransposeConvolution2dLayer(descriptor,
2603  weights,
2605  layerName.c_str());
2606  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(0);
2607 
2608  inputLayer->GetOutputSlot(0).Connect(convLayer->GetInputSlot(0));
2609  convLayer->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));
2610 
2611  inputLayer->GetOutputSlot(0).SetTensorInfo(inputInfo);
2612  convLayer->GetOutputSlot(0).SetTensorInfo(outputInfo);
2613 
2614  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
2615  BOOST_CHECK(deserializedNetwork);
2616 
2617  TransposeConvolution2dLayerVerifier verifier(layerName, {inputInfo}, {outputInfo}, descriptor, weights, biases);
2618  deserializedNetwork->Accept(verifier);
2619 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
A TransposeConvolution2dDescriptor for the TransposeConvolution2dLayer.
bool m_BiasEnabled
Enable/disable bias.
uint32_t m_PadBottom
Padding bottom value in the height dimension.
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
bool has_value() const noexcept
Definition: Optional.hpp:53
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
Definition: Tensor.hpp:199
uint32_t m_PadTop
Padding top 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_StrideY
Stride value when proceeding through input for the height dimension.
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
uint32_t m_PadRight
Padding right value in the width dimension.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [55/60]

BOOST_AUTO_TEST_CASE ( SerializeDeserializeNonLinearNetwork  )

Definition at line 2621 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), LstmInputParams::m_CellBias, LstmInputParams::m_CellLayerNormWeights, LstmInputParams::m_CellToForgetWeights, LstmInputParams::m_CellToInputWeights, LstmInputParams::m_CellToOutputWeights, LstmInputParams::m_ForgetGateBias, LstmInputParams::m_ForgetLayerNormWeights, LstmInputParams::m_InputGateBias, LstmInputParams::m_InputLayerNormWeights, LstmInputParams::m_InputToCellWeights, LstmInputParams::m_InputToForgetWeights, LstmInputParams::m_InputToInputWeights, LstmInputParams::m_InputToOutputWeights, LstmInputParams::m_OutputGateBias, LstmInputParams::m_OutputLayerNormWeights, LstmInputParams::m_ProjectionBias, LstmInputParams::m_ProjectionWeights, LstmInputParams::m_RecurrentToCellWeights, LstmInputParams::m_RecurrentToForgetWeights, LstmInputParams::m_RecurrentToInputWeights, LstmInputParams::m_RecurrentToOutputWeights, and IOutputSlot::SetTensorInfo().

2622 {
2623  class ConstantLayerVerifier : public LayerVerifierBase
2624  {
2625  public:
2626  ConstantLayerVerifier(const std::string& layerName,
2627  const std::vector<armnn::TensorInfo>& inputInfos,
2628  const std::vector<armnn::TensorInfo>& outputInfos,
2629  const armnn::ConstTensor& layerInput)
2630  : LayerVerifierBase(layerName, inputInfos, outputInfos)
2631  , m_LayerInput(layerInput) {}
2632 
2633  void VisitConstantLayer(const armnn::IConnectableLayer* layer,
2634  const armnn::ConstTensor& input,
2635  const char* name) override
2636  {
2637  VerifyNameAndConnections(layer, name);
2638  CompareConstTensor(input, m_LayerInput);
2639  }
2640 
2641  void VisitAdditionLayer(const armnn::IConnectableLayer*, const char*) override {}
2642 
2643  private:
2644  armnn::ConstTensor m_LayerInput;
2645  };
2646 
2647  const std::string layerName("constant");
2649 
2650  std::vector<float> constantData = GenerateRandomData<float>(info.GetNumElements());
2651  armnn::ConstTensor constTensor(info, constantData);
2652 
2654  armnn::IConnectableLayer* input = network->AddInputLayer(0);
2655  armnn::IConnectableLayer* add = network->AddAdditionLayer();
2656  armnn::IConnectableLayer* constant = network->AddConstantLayer(constTensor, layerName.c_str());
2657  armnn::IConnectableLayer* output = network->AddOutputLayer(0);
2658 
2659  input->GetOutputSlot(0).Connect(add->GetInputSlot(0));
2660  constant->GetOutputSlot(0).Connect(add->GetInputSlot(1));
2661  add->GetOutputSlot(0).Connect(output->GetInputSlot(0));
2662 
2663  input->GetOutputSlot(0).SetTensorInfo(info);
2664  constant->GetOutputSlot(0).SetTensorInfo(info);
2665  add->GetOutputSlot(0).SetTensorInfo(info);
2666 
2667  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
2668  BOOST_CHECK(deserializedNetwork);
2669 
2670  ConstantLayerVerifier verifier(layerName, {}, {info}, constTensor);
2671  deserializedNetwork->Accept(verifier);
2672 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
Definition: Tensor.hpp:199
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49

◆ BOOST_AUTO_TEST_CASE() [56/60]

BOOST_AUTO_TEST_CASE ( SerializeDeserializeLstmCifgPeepholeNoProjection  )

Definition at line 2746 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), LstmDescriptor::m_ActivationFunc, LstmInputParams::m_CellBias, LstmInputParams::m_CellToForgetWeights, LstmInputParams::m_CellToOutputWeights, LstmDescriptor::m_CifgEnabled, LstmDescriptor::m_ClippingThresCell, LstmDescriptor::m_ClippingThresProj, LstmInputParams::m_ForgetGateBias, LstmInputParams::m_InputToCellWeights, LstmInputParams::m_InputToForgetWeights, LstmInputParams::m_InputToOutputWeights, LstmInputParams::m_OutputGateBias, LstmDescriptor::m_PeepholeEnabled, LstmDescriptor::m_ProjectionEnabled, LstmInputParams::m_RecurrentToCellWeights, LstmInputParams::m_RecurrentToForgetWeights, LstmInputParams::m_RecurrentToOutputWeights, and IOutputSlot::SetTensorInfo().

2747 {
2748  armnn::LstmDescriptor descriptor;
2749  descriptor.m_ActivationFunc = 4;
2750  descriptor.m_ClippingThresProj = 0.0f;
2751  descriptor.m_ClippingThresCell = 0.0f;
2752  descriptor.m_CifgEnabled = true; // if this is true then we DON'T need to set the OptCifgParams
2753  descriptor.m_ProjectionEnabled = false;
2754  descriptor.m_PeepholeEnabled = true;
2755 
2756  const uint32_t batchSize = 1;
2757  const uint32_t inputSize = 2;
2758  const uint32_t numUnits = 4;
2759  const uint32_t outputSize = numUnits;
2760 
2761  armnn::TensorInfo inputWeightsInfo1({numUnits, inputSize}, armnn::DataType::Float32);
2762  std::vector<float> inputToForgetWeightsData = GenerateRandomData<float>(inputWeightsInfo1.GetNumElements());
2763  armnn::ConstTensor inputToForgetWeights(inputWeightsInfo1, inputToForgetWeightsData);
2764 
2765  std::vector<float> inputToCellWeightsData = GenerateRandomData<float>(inputWeightsInfo1.GetNumElements());
2766  armnn::ConstTensor inputToCellWeights(inputWeightsInfo1, inputToCellWeightsData);
2767 
2768  std::vector<float> inputToOutputWeightsData = GenerateRandomData<float>(inputWeightsInfo1.GetNumElements());
2769  armnn::ConstTensor inputToOutputWeights(inputWeightsInfo1, inputToOutputWeightsData);
2770 
2771  armnn::TensorInfo inputWeightsInfo2({numUnits, outputSize}, armnn::DataType::Float32);
2772  std::vector<float> recurrentToForgetWeightsData = GenerateRandomData<float>(inputWeightsInfo2.GetNumElements());
2773  armnn::ConstTensor recurrentToForgetWeights(inputWeightsInfo2, recurrentToForgetWeightsData);
2774 
2775  std::vector<float> recurrentToCellWeightsData = GenerateRandomData<float>(inputWeightsInfo2.GetNumElements());
2776  armnn::ConstTensor recurrentToCellWeights(inputWeightsInfo2, recurrentToCellWeightsData);
2777 
2778  std::vector<float> recurrentToOutputWeightsData = GenerateRandomData<float>(inputWeightsInfo2.GetNumElements());
2779  armnn::ConstTensor recurrentToOutputWeights(inputWeightsInfo2, recurrentToOutputWeightsData);
2780 
2781  armnn::TensorInfo inputWeightsInfo3({numUnits}, armnn::DataType::Float32);
2782  std::vector<float> cellToForgetWeightsData = GenerateRandomData<float>(inputWeightsInfo3.GetNumElements());
2783  armnn::ConstTensor cellToForgetWeights(inputWeightsInfo3, cellToForgetWeightsData);
2784 
2785  std::vector<float> cellToOutputWeightsData = GenerateRandomData<float>(inputWeightsInfo3.GetNumElements());
2786  armnn::ConstTensor cellToOutputWeights(inputWeightsInfo3, cellToOutputWeightsData);
2787 
2788  std::vector<float> forgetGateBiasData(numUnits, 1.0f);
2789  armnn::ConstTensor forgetGateBias(inputWeightsInfo3, forgetGateBiasData);
2790 
2791  std::vector<float> cellBiasData(numUnits, 0.0f);
2792  armnn::ConstTensor cellBias(inputWeightsInfo3, cellBiasData);
2793 
2794  std::vector<float> outputGateBiasData(numUnits, 0.0f);
2795  armnn::ConstTensor outputGateBias(inputWeightsInfo3, outputGateBiasData);
2796 
2797  armnn::LstmInputParams params;
2798  params.m_InputToForgetWeights = &inputToForgetWeights;
2799  params.m_InputToCellWeights = &inputToCellWeights;
2800  params.m_InputToOutputWeights = &inputToOutputWeights;
2801  params.m_RecurrentToForgetWeights = &recurrentToForgetWeights;
2802  params.m_RecurrentToCellWeights = &recurrentToCellWeights;
2803  params.m_RecurrentToOutputWeights = &recurrentToOutputWeights;
2804  params.m_ForgetGateBias = &forgetGateBias;
2805  params.m_CellBias = &cellBias;
2806  params.m_OutputGateBias = &outputGateBias;
2807  params.m_CellToForgetWeights = &cellToForgetWeights;
2808  params.m_CellToOutputWeights = &cellToOutputWeights;
2809 
2811  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
2812  armnn::IConnectableLayer* const cellStateIn = network->AddInputLayer(1);
2813  armnn::IConnectableLayer* const outputStateIn = network->AddInputLayer(2);
2814  const std::string layerName("lstm");
2815  armnn::IConnectableLayer* const lstmLayer = network->AddLstmLayer(descriptor, params, layerName.c_str());
2816  armnn::IConnectableLayer* const scratchBuffer = network->AddOutputLayer(0);
2817  armnn::IConnectableLayer* const outputStateOut = network->AddOutputLayer(1);
2818  armnn::IConnectableLayer* const cellStateOut = network->AddOutputLayer(2);
2819  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(3);
2820 
2821  // connect up
2822  armnn::TensorInfo inputTensorInfo({ batchSize, inputSize }, armnn::DataType::Float32);
2823  armnn::TensorInfo cellStateTensorInfo({ batchSize, numUnits}, armnn::DataType::Float32);
2824  armnn::TensorInfo outputStateTensorInfo({ batchSize, outputSize }, armnn::DataType::Float32);
2825  armnn::TensorInfo lstmTensorInfoScratchBuff({ batchSize, numUnits * 3 }, armnn::DataType::Float32);
2826 
2827  inputLayer->GetOutputSlot(0).Connect(lstmLayer->GetInputSlot(0));
2828  inputLayer->GetOutputSlot(0).SetTensorInfo(inputTensorInfo);
2829 
2830  outputStateIn->GetOutputSlot(0).Connect(lstmLayer->GetInputSlot(1));
2831  outputStateIn->GetOutputSlot(0).SetTensorInfo(outputStateTensorInfo);
2832 
2833  cellStateIn->GetOutputSlot(0).Connect(lstmLayer->GetInputSlot(2));
2834  cellStateIn->GetOutputSlot(0).SetTensorInfo(cellStateTensorInfo);
2835 
2836  lstmLayer->GetOutputSlot(0).Connect(scratchBuffer->GetInputSlot(0));
2837  lstmLayer->GetOutputSlot(0).SetTensorInfo(lstmTensorInfoScratchBuff);
2838 
2839  lstmLayer->GetOutputSlot(1).Connect(outputStateOut->GetInputSlot(0));
2840  lstmLayer->GetOutputSlot(1).SetTensorInfo(outputStateTensorInfo);
2841 
2842  lstmLayer->GetOutputSlot(2).Connect(cellStateOut->GetInputSlot(0));
2843  lstmLayer->GetOutputSlot(2).SetTensorInfo(cellStateTensorInfo);
2844 
2845  lstmLayer->GetOutputSlot(3).Connect(outputLayer->GetInputSlot(0));
2846  lstmLayer->GetOutputSlot(3).SetTensorInfo(outputStateTensorInfo);
2847 
2848  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
2849  BOOST_CHECK(deserializedNetwork);
2850 
2851  VerifyLstmLayer checker(
2852  layerName,
2853  {inputTensorInfo, outputStateTensorInfo, cellStateTensorInfo},
2854  {lstmTensorInfoScratchBuff, outputStateTensorInfo, cellStateTensorInfo, outputStateTensorInfo},
2855  descriptor,
2856  params);
2857  deserializedNetwork->Accept(checker);
2858 }
bool m_ProjectionEnabled
Enable/disable the projection layer.
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
const ConstTensor * m_CellBias
Definition: LstmParams.hpp:53
float m_ClippingThresProj
Clipping threshold value for the projection.
const ConstTensor * m_CellToOutputWeights
Definition: LstmParams.hpp:50
const ConstTensor * m_RecurrentToCellWeights
Definition: LstmParams.hpp:46
const ConstTensor * m_CellToForgetWeights
Definition: LstmParams.hpp:49
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
const ConstTensor * m_OutputGateBias
Definition: LstmParams.hpp:54
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
const ConstTensor * m_RecurrentToOutputWeights
Definition: LstmParams.hpp:47
An LstmDescriptor for the LstmLayer.
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
Definition: Tensor.hpp:199
bool m_PeepholeEnabled
Enable/disable peephole.
uint32_t m_ActivationFunc
The activation function to use.
float m_ClippingThresCell
Clipping threshold value for the cell state.
const ConstTensor * m_ForgetGateBias
Definition: LstmParams.hpp:52
const ConstTensor * m_InputToCellWeights
Definition: LstmParams.hpp:42
const ConstTensor * m_InputToOutputWeights
Definition: LstmParams.hpp:43
bool m_CifgEnabled
Enable/disable cifg (coupled input & forget gate).
const ConstTensor * m_RecurrentToForgetWeights
Definition: LstmParams.hpp:45
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49
const ConstTensor * m_InputToForgetWeights
Definition: LstmParams.hpp:41

◆ BOOST_AUTO_TEST_CASE() [57/60]

BOOST_AUTO_TEST_CASE ( SerializeDeserializeLstmNoCifgWithPeepholeAndProjection  )

Definition at line 2860 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), LstmDescriptor::m_ActivationFunc, LstmInputParams::m_CellBias, LstmInputParams::m_CellToForgetWeights, LstmInputParams::m_CellToInputWeights, LstmInputParams::m_CellToOutputWeights, LstmDescriptor::m_CifgEnabled, LstmDescriptor::m_ClippingThresCell, LstmDescriptor::m_ClippingThresProj, LstmInputParams::m_ForgetGateBias, LstmInputParams::m_InputGateBias, LstmInputParams::m_InputToCellWeights, LstmInputParams::m_InputToForgetWeights, LstmInputParams::m_InputToInputWeights, LstmInputParams::m_InputToOutputWeights, LstmInputParams::m_OutputGateBias, LstmDescriptor::m_PeepholeEnabled, LstmInputParams::m_ProjectionBias, LstmDescriptor::m_ProjectionEnabled, LstmInputParams::m_ProjectionWeights, LstmInputParams::m_RecurrentToCellWeights, LstmInputParams::m_RecurrentToForgetWeights, LstmInputParams::m_RecurrentToInputWeights, LstmInputParams::m_RecurrentToOutputWeights, and IOutputSlot::SetTensorInfo().

2861 {
2862  armnn::LstmDescriptor descriptor;
2863  descriptor.m_ActivationFunc = 4;
2864  descriptor.m_ClippingThresProj = 0.0f;
2865  descriptor.m_ClippingThresCell = 0.0f;
2866  descriptor.m_CifgEnabled = false; // if this is true then we DON'T need to set the OptCifgParams
2867  descriptor.m_ProjectionEnabled = true;
2868  descriptor.m_PeepholeEnabled = true;
2869 
2870  const uint32_t batchSize = 2;
2871  const uint32_t inputSize = 5;
2872  const uint32_t numUnits = 20;
2873  const uint32_t outputSize = 16;
2874 
2875  armnn::TensorInfo tensorInfo20x5({numUnits, inputSize}, armnn::DataType::Float32);
2876  std::vector<float> inputToInputWeightsData = GenerateRandomData<float>(tensorInfo20x5.GetNumElements());
2877  armnn::ConstTensor inputToInputWeights(tensorInfo20x5, inputToInputWeightsData);
2878 
2879  std::vector<float> inputToForgetWeightsData = GenerateRandomData<float>(tensorInfo20x5.GetNumElements());
2880  armnn::ConstTensor inputToForgetWeights(tensorInfo20x5, inputToForgetWeightsData);
2881 
2882  std::vector<float> inputToCellWeightsData = GenerateRandomData<float>(tensorInfo20x5.GetNumElements());
2883  armnn::ConstTensor inputToCellWeights(tensorInfo20x5, inputToCellWeightsData);
2884 
2885  std::vector<float> inputToOutputWeightsData = GenerateRandomData<float>(tensorInfo20x5.GetNumElements());
2886  armnn::ConstTensor inputToOutputWeights(tensorInfo20x5, inputToOutputWeightsData);
2887 
2888  armnn::TensorInfo tensorInfo20({numUnits}, armnn::DataType::Float32);
2889  std::vector<float> inputGateBiasData = GenerateRandomData<float>(tensorInfo20.GetNumElements());
2890  armnn::ConstTensor inputGateBias(tensorInfo20, inputGateBiasData);
2891 
2892  std::vector<float> forgetGateBiasData = GenerateRandomData<float>(tensorInfo20.GetNumElements());
2893  armnn::ConstTensor forgetGateBias(tensorInfo20, forgetGateBiasData);
2894 
2895  std::vector<float> cellBiasData = GenerateRandomData<float>(tensorInfo20.GetNumElements());
2896  armnn::ConstTensor cellBias(tensorInfo20, cellBiasData);
2897 
2898  std::vector<float> outputGateBiasData = GenerateRandomData<float>(tensorInfo20.GetNumElements());
2899  armnn::ConstTensor outputGateBias(tensorInfo20, outputGateBiasData);
2900 
2901  armnn::TensorInfo tensorInfo20x16({numUnits, outputSize}, armnn::DataType::Float32);
2902  std::vector<float> recurrentToInputWeightsData = GenerateRandomData<float>(tensorInfo20x16.GetNumElements());
2903  armnn::ConstTensor recurrentToInputWeights(tensorInfo20x16, recurrentToInputWeightsData);
2904 
2905  std::vector<float> recurrentToForgetWeightsData = GenerateRandomData<float>(tensorInfo20x16.GetNumElements());
2906  armnn::ConstTensor recurrentToForgetWeights(tensorInfo20x16, recurrentToForgetWeightsData);
2907 
2908  std::vector<float> recurrentToCellWeightsData = GenerateRandomData<float>(tensorInfo20x16.GetNumElements());
2909  armnn::ConstTensor recurrentToCellWeights(tensorInfo20x16, recurrentToCellWeightsData);
2910 
2911  std::vector<float> recurrentToOutputWeightsData = GenerateRandomData<float>(tensorInfo20x16.GetNumElements());
2912  armnn::ConstTensor recurrentToOutputWeights(tensorInfo20x16, recurrentToOutputWeightsData);
2913 
2914  std::vector<float> cellToInputWeightsData = GenerateRandomData<float>(tensorInfo20.GetNumElements());
2915  armnn::ConstTensor cellToInputWeights(tensorInfo20, cellToInputWeightsData);
2916 
2917  std::vector<float> cellToForgetWeightsData = GenerateRandomData<float>(tensorInfo20.GetNumElements());
2918  armnn::ConstTensor cellToForgetWeights(tensorInfo20, cellToForgetWeightsData);
2919 
2920  std::vector<float> cellToOutputWeightsData = GenerateRandomData<float>(tensorInfo20.GetNumElements());
2921  armnn::ConstTensor cellToOutputWeights(tensorInfo20, cellToOutputWeightsData);
2922 
2923  armnn::TensorInfo tensorInfo16x20({outputSize, numUnits}, armnn::DataType::Float32);
2924  std::vector<float> projectionWeightsData = GenerateRandomData<float>(tensorInfo16x20.GetNumElements());
2925  armnn::ConstTensor projectionWeights(tensorInfo16x20, projectionWeightsData);
2926 
2927  armnn::TensorInfo tensorInfo16({outputSize}, armnn::DataType::Float32);
2928  std::vector<float> projectionBiasData(outputSize, 0.f);
2929  armnn::ConstTensor projectionBias(tensorInfo16, projectionBiasData);
2930 
2931  armnn::LstmInputParams params;
2932  params.m_InputToForgetWeights = &inputToForgetWeights;
2933  params.m_InputToCellWeights = &inputToCellWeights;
2934  params.m_InputToOutputWeights = &inputToOutputWeights;
2935  params.m_RecurrentToForgetWeights = &recurrentToForgetWeights;
2936  params.m_RecurrentToCellWeights = &recurrentToCellWeights;
2937  params.m_RecurrentToOutputWeights = &recurrentToOutputWeights;
2938  params.m_ForgetGateBias = &forgetGateBias;
2939  params.m_CellBias = &cellBias;
2940  params.m_OutputGateBias = &outputGateBias;
2941 
2942  // additional params because: descriptor.m_CifgEnabled = false
2943  params.m_InputToInputWeights = &inputToInputWeights;
2944  params.m_RecurrentToInputWeights = &recurrentToInputWeights;
2945  params.m_CellToInputWeights = &cellToInputWeights;
2946  params.m_InputGateBias = &inputGateBias;
2947 
2948  // additional params because: descriptor.m_ProjectionEnabled = true
2949  params.m_ProjectionWeights = &projectionWeights;
2950  params.m_ProjectionBias = &projectionBias;
2951 
2952  // additional params because: descriptor.m_PeepholeEnabled = true
2953  params.m_CellToForgetWeights = &cellToForgetWeights;
2954  params.m_CellToOutputWeights = &cellToOutputWeights;
2955 
2957  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
2958  armnn::IConnectableLayer* const cellStateIn = network->AddInputLayer(1);
2959  armnn::IConnectableLayer* const outputStateIn = network->AddInputLayer(2);
2960  const std::string layerName("lstm");
2961  armnn::IConnectableLayer* const lstmLayer = network->AddLstmLayer(descriptor, params, layerName.c_str());
2962  armnn::IConnectableLayer* const scratchBuffer = network->AddOutputLayer(0);
2963  armnn::IConnectableLayer* const outputStateOut = network->AddOutputLayer(1);
2964  armnn::IConnectableLayer* const cellStateOut = network->AddOutputLayer(2);
2965  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(3);
2966 
2967  // connect up
2968  armnn::TensorInfo inputTensorInfo({ batchSize, inputSize }, armnn::DataType::Float32);
2969  armnn::TensorInfo cellStateTensorInfo({ batchSize, numUnits}, armnn::DataType::Float32);
2970  armnn::TensorInfo outputStateTensorInfo({ batchSize, outputSize }, armnn::DataType::Float32);
2971  armnn::TensorInfo lstmTensorInfoScratchBuff({ batchSize, numUnits * 4 }, armnn::DataType::Float32);
2972 
2973  inputLayer->GetOutputSlot(0).Connect(lstmLayer->GetInputSlot(0));
2974  inputLayer->GetOutputSlot(0).SetTensorInfo(inputTensorInfo);
2975 
2976  outputStateIn->GetOutputSlot(0).Connect(lstmLayer->GetInputSlot(1));
2977  outputStateIn->GetOutputSlot(0).SetTensorInfo(outputStateTensorInfo);
2978 
2979  cellStateIn->GetOutputSlot(0).Connect(lstmLayer->GetInputSlot(2));
2980  cellStateIn->GetOutputSlot(0).SetTensorInfo(cellStateTensorInfo);
2981 
2982  lstmLayer->GetOutputSlot(0).Connect(scratchBuffer->GetInputSlot(0));
2983  lstmLayer->GetOutputSlot(0).SetTensorInfo(lstmTensorInfoScratchBuff);
2984 
2985  lstmLayer->GetOutputSlot(1).Connect(outputStateOut->GetInputSlot(0));
2986  lstmLayer->GetOutputSlot(1).SetTensorInfo(outputStateTensorInfo);
2987 
2988  lstmLayer->GetOutputSlot(2).Connect(cellStateOut->GetInputSlot(0));
2989  lstmLayer->GetOutputSlot(2).SetTensorInfo(cellStateTensorInfo);
2990 
2991  lstmLayer->GetOutputSlot(3).Connect(outputLayer->GetInputSlot(0));
2992  lstmLayer->GetOutputSlot(3).SetTensorInfo(outputStateTensorInfo);
2993 
2994  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
2995  BOOST_CHECK(deserializedNetwork);
2996 
2997  VerifyLstmLayer checker(
2998  layerName,
2999  {inputTensorInfo, outputStateTensorInfo, cellStateTensorInfo},
3000  {lstmTensorInfoScratchBuff, outputStateTensorInfo, cellStateTensorInfo, outputStateTensorInfo},
3001  descriptor,
3002  params);
3003  deserializedNetwork->Accept(checker);
3004 }
bool m_ProjectionEnabled
Enable/disable the projection layer.
const ConstTensor * m_ProjectionWeights
Definition: LstmParams.hpp:55
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
const ConstTensor * m_CellBias
Definition: LstmParams.hpp:53
float m_ClippingThresProj
Clipping threshold value for the projection.
const ConstTensor * m_CellToOutputWeights
Definition: LstmParams.hpp:50
const ConstTensor * m_CellToInputWeights
Definition: LstmParams.hpp:48
const ConstTensor * m_InputGateBias
Definition: LstmParams.hpp:51
const ConstTensor * m_RecurrentToCellWeights
Definition: LstmParams.hpp:46
const ConstTensor * m_CellToForgetWeights
Definition: LstmParams.hpp:49
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
const ConstTensor * m_OutputGateBias
Definition: LstmParams.hpp:54
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
const ConstTensor * m_RecurrentToOutputWeights
Definition: LstmParams.hpp:47
An LstmDescriptor for the LstmLayer.
const ConstTensor * m_ProjectionBias
Definition: LstmParams.hpp:56
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
Definition: Tensor.hpp:199
bool m_PeepholeEnabled
Enable/disable peephole.
uint32_t m_ActivationFunc
The activation function to use.
float m_ClippingThresCell
Clipping threshold value for the cell state.
const ConstTensor * m_ForgetGateBias
Definition: LstmParams.hpp:52
const ConstTensor * m_InputToCellWeights
Definition: LstmParams.hpp:42
const ConstTensor * m_InputToOutputWeights
Definition: LstmParams.hpp:43
bool m_CifgEnabled
Enable/disable cifg (coupled input & forget gate).
const ConstTensor * m_RecurrentToForgetWeights
Definition: LstmParams.hpp:45
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
const ConstTensor * m_RecurrentToInputWeights
Definition: LstmParams.hpp:44
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49
const ConstTensor * m_InputToForgetWeights
Definition: LstmParams.hpp:41
const ConstTensor * m_InputToInputWeights
Definition: LstmParams.hpp:40

◆ BOOST_AUTO_TEST_CASE() [58/60]

BOOST_AUTO_TEST_CASE ( SerializeDeserializeLstmNoCifgWithPeepholeWithProjectionWithLayerNorm  )

Definition at line 3006 of file SerializerTests.cpp.

References BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), armnn::Float32, IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), LstmDescriptor::m_ActivationFunc, LstmInputParams::m_CellBias, LstmInputParams::m_CellLayerNormWeights, LstmInputParams::m_CellToForgetWeights, LstmInputParams::m_CellToInputWeights, LstmInputParams::m_CellToOutputWeights, LstmDescriptor::m_CifgEnabled, LstmDescriptor::m_ClippingThresCell, LstmDescriptor::m_ClippingThresProj, LstmInputParams::m_ForgetGateBias, LstmInputParams::m_ForgetLayerNormWeights, LstmInputParams::m_InputGateBias, LstmInputParams::m_InputLayerNormWeights, LstmInputParams::m_InputToCellWeights, LstmInputParams::m_InputToForgetWeights, LstmInputParams::m_InputToInputWeights, LstmInputParams::m_InputToOutputWeights, LstmDescriptor::m_LayerNormEnabled, LstmInputParams::m_OutputGateBias, LstmInputParams::m_OutputLayerNormWeights, LstmDescriptor::m_PeepholeEnabled, LstmInputParams::m_ProjectionBias, LstmDescriptor::m_ProjectionEnabled, LstmInputParams::m_ProjectionWeights, LstmInputParams::m_RecurrentToCellWeights, LstmInputParams::m_RecurrentToForgetWeights, LstmInputParams::m_RecurrentToInputWeights, LstmInputParams::m_RecurrentToOutputWeights, and IOutputSlot::SetTensorInfo().

3007 {
3008  armnn::LstmDescriptor descriptor;
3009  descriptor.m_ActivationFunc = 4;
3010  descriptor.m_ClippingThresProj = 0.0f;
3011  descriptor.m_ClippingThresCell = 0.0f;
3012  descriptor.m_CifgEnabled = false; // if this is true then we DON'T need to set the OptCifgParams
3013  descriptor.m_ProjectionEnabled = true;
3014  descriptor.m_PeepholeEnabled = true;
3015  descriptor.m_LayerNormEnabled = true;
3016 
3017  const uint32_t batchSize = 2;
3018  const uint32_t inputSize = 5;
3019  const uint32_t numUnits = 20;
3020  const uint32_t outputSize = 16;
3021 
3022  armnn::TensorInfo tensorInfo20x5({numUnits, inputSize}, armnn::DataType::Float32);
3023  std::vector<float> inputToInputWeightsData = GenerateRandomData<float>(tensorInfo20x5.GetNumElements());
3024  armnn::ConstTensor inputToInputWeights(tensorInfo20x5, inputToInputWeightsData);
3025 
3026  std::vector<float> inputToForgetWeightsData = GenerateRandomData<float>(tensorInfo20x5.GetNumElements());
3027  armnn::ConstTensor inputToForgetWeights(tensorInfo20x5, inputToForgetWeightsData);
3028 
3029  std::vector<float> inputToCellWeightsData = GenerateRandomData<float>(tensorInfo20x5.GetNumElements());
3030  armnn::ConstTensor inputToCellWeights(tensorInfo20x5, inputToCellWeightsData);
3031 
3032  std::vector<float> inputToOutputWeightsData = GenerateRandomData<float>(tensorInfo20x5.GetNumElements());
3033  armnn::ConstTensor inputToOutputWeights(tensorInfo20x5, inputToOutputWeightsData);
3034 
3035  armnn::TensorInfo tensorInfo20({numUnits}, armnn::DataType::Float32);
3036  std::vector<float> inputGateBiasData = GenerateRandomData<float>(tensorInfo20.GetNumElements());
3037  armnn::ConstTensor inputGateBias(tensorInfo20, inputGateBiasData);
3038 
3039  std::vector<float> forgetGateBiasData = GenerateRandomData<float>(tensorInfo20.GetNumElements());
3040  armnn::ConstTensor forgetGateBias(tensorInfo20, forgetGateBiasData);
3041 
3042  std::vector<float> cellBiasData = GenerateRandomData<float>(tensorInfo20.GetNumElements());
3043  armnn::ConstTensor cellBias(tensorInfo20, cellBiasData);
3044 
3045  std::vector<float> outputGateBiasData = GenerateRandomData<float>(tensorInfo20.GetNumElements());
3046  armnn::ConstTensor outputGateBias(tensorInfo20, outputGateBiasData);
3047 
3048  armnn::TensorInfo tensorInfo20x16({numUnits, outputSize}, armnn::DataType::Float32);
3049  std::vector<float> recurrentToInputWeightsData = GenerateRandomData<float>(tensorInfo20x16.GetNumElements());
3050  armnn::ConstTensor recurrentToInputWeights(tensorInfo20x16, recurrentToInputWeightsData);
3051 
3052  std::vector<float> recurrentToForgetWeightsData = GenerateRandomData<float>(tensorInfo20x16.GetNumElements());
3053  armnn::ConstTensor recurrentToForgetWeights(tensorInfo20x16, recurrentToForgetWeightsData);
3054 
3055  std::vector<float> recurrentToCellWeightsData = GenerateRandomData<float>(tensorInfo20x16.GetNumElements());
3056  armnn::ConstTensor recurrentToCellWeights(tensorInfo20x16, recurrentToCellWeightsData);
3057 
3058  std::vector<float> recurrentToOutputWeightsData = GenerateRandomData<float>(tensorInfo20x16.GetNumElements());
3059  armnn::ConstTensor recurrentToOutputWeights(tensorInfo20x16, recurrentToOutputWeightsData);
3060 
3061  std::vector<float> cellToInputWeightsData = GenerateRandomData<float>(tensorInfo20.GetNumElements());
3062  armnn::ConstTensor cellToInputWeights(tensorInfo20, cellToInputWeightsData);
3063 
3064  std::vector<float> cellToForgetWeightsData = GenerateRandomData<float>(tensorInfo20.GetNumElements());
3065  armnn::ConstTensor cellToForgetWeights(tensorInfo20, cellToForgetWeightsData);
3066 
3067  std::vector<float> cellToOutputWeightsData = GenerateRandomData<float>(tensorInfo20.GetNumElements());
3068  armnn::ConstTensor cellToOutputWeights(tensorInfo20, cellToOutputWeightsData);
3069 
3070  armnn::TensorInfo tensorInfo16x20({outputSize, numUnits}, armnn::DataType::Float32);
3071  std::vector<float> projectionWeightsData = GenerateRandomData<float>(tensorInfo16x20.GetNumElements());
3072  armnn::ConstTensor projectionWeights(tensorInfo16x20, projectionWeightsData);
3073 
3074  armnn::TensorInfo tensorInfo16({outputSize}, armnn::DataType::Float32);
3075  std::vector<float> projectionBiasData(outputSize, 0.f);
3076  armnn::ConstTensor projectionBias(tensorInfo16, projectionBiasData);
3077 
3078  std::vector<float> inputLayerNormWeightsData = GenerateRandomData<float>(tensorInfo20.GetNumElements());
3079  armnn::ConstTensor inputLayerNormWeights(tensorInfo20, forgetGateBiasData);
3080 
3081  std::vector<float> forgetLayerNormWeightsData = GenerateRandomData<float>(tensorInfo20.GetNumElements());
3082  armnn::ConstTensor forgetLayerNormWeights(tensorInfo20, forgetGateBiasData);
3083 
3084  std::vector<float> cellLayerNormWeightsData = GenerateRandomData<float>(tensorInfo20.GetNumElements());
3085  armnn::ConstTensor cellLayerNormWeights(tensorInfo20, forgetGateBiasData);
3086 
3087  std::vector<float> outLayerNormWeightsData = GenerateRandomData<float>(tensorInfo20.GetNumElements());
3088  armnn::ConstTensor outLayerNormWeights(tensorInfo20, forgetGateBiasData);
3089 
3090  armnn::LstmInputParams params;
3091  params.m_InputToForgetWeights = &inputToForgetWeights;
3092  params.m_InputToCellWeights = &inputToCellWeights;
3093  params.m_InputToOutputWeights = &inputToOutputWeights;
3094  params.m_RecurrentToForgetWeights = &recurrentToForgetWeights;
3095  params.m_RecurrentToCellWeights = &recurrentToCellWeights;
3096  params.m_RecurrentToOutputWeights = &recurrentToOutputWeights;
3097  params.m_ForgetGateBias = &forgetGateBias;
3098  params.m_CellBias = &cellBias;
3099  params.m_OutputGateBias = &outputGateBias;
3100 
3101  // additional params because: descriptor.m_CifgEnabled = false
3102  params.m_InputToInputWeights = &inputToInputWeights;
3103  params.m_RecurrentToInputWeights = &recurrentToInputWeights;
3104  params.m_CellToInputWeights = &cellToInputWeights;
3105  params.m_InputGateBias = &inputGateBias;
3106 
3107  // additional params because: descriptor.m_ProjectionEnabled = true
3108  params.m_ProjectionWeights = &projectionWeights;
3109  params.m_ProjectionBias = &projectionBias;
3110 
3111  // additional params because: descriptor.m_PeepholeEnabled = true
3112  params.m_CellToForgetWeights = &cellToForgetWeights;
3113  params.m_CellToOutputWeights = &cellToOutputWeights;
3114 
3115  // additional params because: despriptor.m_LayerNormEnabled = true
3116  params.m_InputLayerNormWeights = &inputLayerNormWeights;
3117  params.m_ForgetLayerNormWeights = &forgetLayerNormWeights;
3118  params.m_CellLayerNormWeights = &cellLayerNormWeights;
3119  params.m_OutputLayerNormWeights = &outLayerNormWeights;
3120 
3122  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
3123  armnn::IConnectableLayer* const cellStateIn = network->AddInputLayer(1);
3124  armnn::IConnectableLayer* const outputStateIn = network->AddInputLayer(2);
3125  const std::string layerName("lstm");
3126  armnn::IConnectableLayer* const lstmLayer = network->AddLstmLayer(descriptor, params, layerName.c_str());
3127  armnn::IConnectableLayer* const scratchBuffer = network->AddOutputLayer(0);
3128  armnn::IConnectableLayer* const outputStateOut = network->AddOutputLayer(1);
3129  armnn::IConnectableLayer* const cellStateOut = network->AddOutputLayer(2);
3130  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(3);
3131 
3132  // connect up
3133  armnn::TensorInfo inputTensorInfo({ batchSize, inputSize }, armnn::DataType::Float32);
3134  armnn::TensorInfo cellStateTensorInfo({ batchSize, numUnits}, armnn::DataType::Float32);
3135  armnn::TensorInfo outputStateTensorInfo({ batchSize, outputSize }, armnn::DataType::Float32);
3136  armnn::TensorInfo lstmTensorInfoScratchBuff({ batchSize, numUnits * 4 }, armnn::DataType::Float32);
3137 
3138  inputLayer->GetOutputSlot(0).Connect(lstmLayer->GetInputSlot(0));
3139  inputLayer->GetOutputSlot(0).SetTensorInfo(inputTensorInfo);
3140 
3141  outputStateIn->GetOutputSlot(0).Connect(lstmLayer->GetInputSlot(1));
3142  outputStateIn->GetOutputSlot(0).SetTensorInfo(outputStateTensorInfo);
3143 
3144  cellStateIn->GetOutputSlot(0).Connect(lstmLayer->GetInputSlot(2));
3145  cellStateIn->GetOutputSlot(0).SetTensorInfo(cellStateTensorInfo);
3146 
3147  lstmLayer->GetOutputSlot(0).Connect(scratchBuffer->GetInputSlot(0));
3148  lstmLayer->GetOutputSlot(0).SetTensorInfo(lstmTensorInfoScratchBuff);
3149 
3150  lstmLayer->GetOutputSlot(1).Connect(outputStateOut->GetInputSlot(0));
3151  lstmLayer->GetOutputSlot(1).SetTensorInfo(outputStateTensorInfo);
3152 
3153  lstmLayer->GetOutputSlot(2).Connect(cellStateOut->GetInputSlot(0));
3154  lstmLayer->GetOutputSlot(2).SetTensorInfo(cellStateTensorInfo);
3155 
3156  lstmLayer->GetOutputSlot(3).Connect(outputLayer->GetInputSlot(0));
3157  lstmLayer->GetOutputSlot(3).SetTensorInfo(outputStateTensorInfo);
3158 
3159  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
3160  BOOST_CHECK(deserializedNetwork);
3161 
3162  VerifyLstmLayer checker(
3163  layerName,
3164  {inputTensorInfo, outputStateTensorInfo, cellStateTensorInfo},
3165  {lstmTensorInfoScratchBuff, outputStateTensorInfo, cellStateTensorInfo, outputStateTensorInfo},
3166  descriptor,
3167  params);
3168  deserializedNetwork->Accept(checker);
3169 }
bool m_ProjectionEnabled
Enable/disable the projection layer.
const ConstTensor * m_ProjectionWeights
Definition: LstmParams.hpp:55
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
const ConstTensor * m_CellBias
Definition: LstmParams.hpp:53
float m_ClippingThresProj
Clipping threshold value for the projection.
const ConstTensor * m_CellToOutputWeights
Definition: LstmParams.hpp:50
const ConstTensor * m_CellToInputWeights
Definition: LstmParams.hpp:48
const ConstTensor * m_InputGateBias
Definition: LstmParams.hpp:51
const ConstTensor * m_RecurrentToCellWeights
Definition: LstmParams.hpp:46
const ConstTensor * m_ForgetLayerNormWeights
Definition: LstmParams.hpp:58
const ConstTensor * m_CellToForgetWeights
Definition: LstmParams.hpp:49
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
const ConstTensor * m_OutputGateBias
Definition: LstmParams.hpp:54
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
const ConstTensor * m_InputLayerNormWeights
Definition: LstmParams.hpp:57
const ConstTensor * m_RecurrentToOutputWeights
Definition: LstmParams.hpp:47
An LstmDescriptor for the LstmLayer.
const ConstTensor * m_ProjectionBias
Definition: LstmParams.hpp:56
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
Definition: Tensor.hpp:199
bool m_PeepholeEnabled
Enable/disable peephole.
uint32_t m_ActivationFunc
The activation function to use.
float m_ClippingThresCell
Clipping threshold value for the cell state.
const ConstTensor * m_CellLayerNormWeights
Definition: LstmParams.hpp:59
const ConstTensor * m_ForgetGateBias
Definition: LstmParams.hpp:52
const ConstTensor * m_InputToCellWeights
Definition: LstmParams.hpp:42
const ConstTensor * m_InputToOutputWeights
Definition: LstmParams.hpp:43
bool m_CifgEnabled
Enable/disable cifg (coupled input & forget gate).
const ConstTensor * m_RecurrentToForgetWeights
Definition: LstmParams.hpp:45
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
const ConstTensor * m_RecurrentToInputWeights
Definition: LstmParams.hpp:44
bool m_LayerNormEnabled
Enable/disable layer normalization.
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
const ConstTensor * m_OutputLayerNormWeights
Definition: LstmParams.hpp:60
static INetworkPtr Create()
Definition: Network.cpp:49
const ConstTensor * m_InputToForgetWeights
Definition: LstmParams.hpp:41
const ConstTensor * m_InputToInputWeights
Definition: LstmParams.hpp:40

◆ BOOST_AUTO_TEST_CASE() [59/60]

BOOST_AUTO_TEST_CASE ( EnsureLstmLayersBackwardCompatibility  )

Definition at line 3171 of file SerializerTests.cpp.

References BOOST_CHECK(), armnn::Float32, LstmDescriptor::m_ActivationFunc, QuantizedLstmInputParams::m_CellBias, LstmInputParams::m_CellBias, LstmInputParams::m_CellToForgetWeights, LstmInputParams::m_CellToInputWeights, LstmInputParams::m_CellToOutputWeights, LstmDescriptor::m_CifgEnabled, LstmDescriptor::m_ClippingThresCell, LstmDescriptor::m_ClippingThresProj, QuantizedLstmInputParams::m_ForgetGateBias, LstmInputParams::m_ForgetGateBias, QuantizedLstmInputParams::m_InputGateBias, LstmInputParams::m_InputGateBias, QuantizedLstmInputParams::m_InputToCellWeights, LstmInputParams::m_InputToCellWeights, QuantizedLstmInputParams::m_InputToForgetWeights, LstmInputParams::m_InputToForgetWeights, QuantizedLstmInputParams::m_InputToInputWeights, LstmInputParams::m_InputToInputWeights, QuantizedLstmInputParams::m_InputToOutputWeights, LstmInputParams::m_InputToOutputWeights, QuantizedLstmInputParams::m_OutputGateBias, LstmInputParams::m_OutputGateBias, LstmDescriptor::m_PeepholeEnabled, LstmInputParams::m_ProjectionBias, LstmDescriptor::m_ProjectionEnabled, LstmInputParams::m_ProjectionWeights, QuantizedLstmInputParams::m_RecurrentToCellWeights, LstmInputParams::m_RecurrentToCellWeights, QuantizedLstmInputParams::m_RecurrentToForgetWeights, LstmInputParams::m_RecurrentToForgetWeights, QuantizedLstmInputParams::m_RecurrentToInputWeights, LstmInputParams::m_RecurrentToInputWeights, QuantizedLstmInputParams::m_RecurrentToOutputWeights, and LstmInputParams::m_RecurrentToOutputWeights.

3172 {
3173  // The hex data below is a flat buffer containing a lstm layer with no Cifg, with peephole and projection
3174  // enabled. That data was obtained before additional layer normalization parameters where added to the
3175  // lstm serializer. That way it can be tested if a lstm model with the old parameter configuration can
3176  // still be loaded
3177  const std::vector<uint8_t> lstmNoCifgWithPeepholeAndProjectionModel =
3178  {
3179  0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x10, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x0A, 0x00,
3180  0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x2C, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
3181  0xDC, 0x29, 0x00, 0x00, 0x38, 0x29, 0x00, 0x00, 0xB4, 0x28, 0x00, 0x00, 0x94, 0x01, 0x00, 0x00, 0x3C, 0x01,
3182  0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
3183  0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00,
3184  0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x70, 0xD6, 0xFF, 0xFF,
3185  0x00, 0x00, 0x00, 0x0B, 0x04, 0x00, 0x00, 0x00, 0x06, 0xD7, 0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0x88, 0xD7,
3186  0xFF, 0xFF, 0x08, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xF6, 0xD6, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00,
3187  0x10, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00,
3188  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3189  0xE8, 0xD7, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xC8, 0xD6, 0xFF, 0xFF, 0x00, 0x00,
3190  0x00, 0x0B, 0x04, 0x00, 0x00, 0x00, 0x5E, 0xD7, 0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0xE0, 0xD7, 0xFF, 0xFF,
3191  0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x4E, 0xD7, 0xFF, 0xFF, 0x06, 0x00, 0x00, 0x00, 0x10, 0x00,
3192  0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3193  0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xD8,
3194  0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0xD7, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x0B,
3195  0x04, 0x00, 0x00, 0x00, 0xB6, 0xD7, 0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0x38, 0xD8, 0xFF, 0xFF, 0x08, 0x00,
3196  0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xA6, 0xD7, 0xFF, 0xFF, 0x05, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
3197  0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3198  0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x98, 0xD8, 0xFF, 0xFF,
3199  0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x78, 0xD7, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x0B, 0x04, 0x00,
3200  0x00, 0x00, 0x0E, 0xD8, 0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0x16, 0xD8, 0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00,
3201  0xFA, 0xD7, 0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00,
3202  0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
3203  0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xEC, 0xD8, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
3204  0x00, 0x00, 0x6C, 0xD8, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x23, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00,
3205  0x12, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x0A, 0x00, 0x00, 0x00, 0xE0, 0x25, 0x00, 0x00, 0xD0, 0x25,
3206  0x00, 0x00, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x48, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0C, 0x00,
3207  0x10, 0x00, 0x14, 0x00, 0x18, 0x00, 0x1C, 0x00, 0x20, 0x00, 0x24, 0x00, 0x28, 0x00, 0x2C, 0x00, 0x30, 0x00,
3208  0x34, 0x00, 0x38, 0x00, 0x3C, 0x00, 0x40, 0x00, 0x44, 0x00, 0x26, 0x00, 0x00, 0x00, 0xC4, 0x23, 0x00, 0x00,
3209  0xF8, 0x21, 0x00, 0x00, 0x2C, 0x20, 0x00, 0x00, 0xF0, 0x1A, 0x00, 0x00, 0xB4, 0x15, 0x00, 0x00, 0x78, 0x10,
3210  0x00, 0x00, 0xF0, 0x0F, 0x00, 0x00, 0x68, 0x0F, 0x00, 0x00, 0xE0, 0x0E, 0x00, 0x00, 0x14, 0x0D, 0x00, 0x00,
3211  0xD8, 0x07, 0x00, 0x00, 0x50, 0x07, 0x00, 0x00, 0xC8, 0x06, 0x00, 0x00, 0x8C, 0x01, 0x00, 0x00, 0x14, 0x01,
3212  0x00, 0x00, 0x8C, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xEE, 0xD7, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x03,
3213  0x64, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xFE, 0xD8, 0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0x14, 0x00,
3214  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3215  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3216  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3217  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3218  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5A, 0xD8, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01,
3219  0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x72, 0xD8,
3220  0xFF, 0xFF, 0x00, 0x00, 0x00, 0x03, 0x64, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x82, 0xD9, 0xFF, 0xFF,
3221  0x04, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3222  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3223  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3224  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3225  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDE, 0xD8,
3226  0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
3227  0x14, 0x00, 0x00, 0x00, 0xF6, 0xD8, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x03, 0x54, 0x00, 0x00, 0x00, 0x04, 0x00,
3228  0x00, 0x00, 0x06, 0xDA, 0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3229  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3230  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3231  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3232  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0xD9, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00,
3233  0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x6A, 0xD9, 0xFF, 0xFF, 0x00, 0x00,
3234  0x00, 0x03, 0x14, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x7A, 0xDA, 0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00,
3235  0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3236  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3237  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3238  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3239  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3240  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3241  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3242  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3243  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3244  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3245  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3246  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3247  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3248  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3249  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3250  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3251  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3252  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3253  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3254  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3255  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3256  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3257  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3258  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3259  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3260  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3261  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3262  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3263  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3264  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3265  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3266  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3267  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3268  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3269  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3270  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3271  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3272  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3273  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3274  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3275  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3276  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3277  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3278  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3279  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3280  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3281  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3282  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3283  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3284  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3285  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3286  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3287  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3288  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3289  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3290  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3291  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3292  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3293  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3294  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3295  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3296  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3297  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3298  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3299  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3300  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3301  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3302  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3303  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3304  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3305  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3306  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0xDE, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00,
3307  0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xA2, 0xDE,
3308  0xFF, 0xFF, 0x00, 0x00, 0x00, 0x03, 0x64, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xB2, 0xDF, 0xFF, 0xFF,
3309  0x04, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3310  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3311  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3312  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3313  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0xDF,
3314  0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
3315  0x14, 0x00, 0x00, 0x00, 0x26, 0xDF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x03, 0x64, 0x00, 0x00, 0x00, 0x04, 0x00,
3316  0x00, 0x00, 0x36, 0xE0, 0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3317  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3318  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3319  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3320  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3321  0x00, 0x00, 0x00, 0x00, 0x92, 0xDF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
3322  0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xAA, 0xDF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x03,
3323  0x14, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xBA, 0xE0, 0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0x40, 0x01,
3324  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3325  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3326  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3327  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3328  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3329  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3330  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3331  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3332  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3333  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3334  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3335  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3336  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3337  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3338  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3339  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3340  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3341  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3342  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3343  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3344  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3345  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3346  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3347  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3348  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3349  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3350  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3351  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3352  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3353  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3354  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3355  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3356  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3357  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3358  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3359  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3360  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3361  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3362  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3363  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3364  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3365  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3366  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3367  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3368  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3369  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3370  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3371  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3372  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3373  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3374  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3375  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3376  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3377  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3378  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3379  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3380  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3381  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3382  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3383  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3384  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3385  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3386  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3387  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3388  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3389  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3390  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3391  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3392  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3393  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3394  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3395  0x00, 0x00, 0x00, 0x00, 0xC6, 0xE4, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
3396  0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xE2, 0xE4, 0xFF, 0xFF,
3397  0x00, 0x00, 0x00, 0x03, 0xA4, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xF2, 0xE5, 0xFF, 0xFF, 0x04, 0x00,
3398  0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3399  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3400  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3401  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3402  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3403  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3404  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3405  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3406  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3407  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3408  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3409  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3410  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3411  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3412  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3413  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3414  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3415  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3416  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3417  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3418  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3419  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3420  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8E, 0xE6, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01,
3421  0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x05, 0x00,
3422  0x00, 0x00, 0xAA, 0xE6, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x03, 0x64, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
3423  0xBA, 0xE7, 0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3424  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3425  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3426  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3427  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3428  0x00, 0x00, 0x16, 0xE7, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3429  0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x2E, 0xE7, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x03, 0x64, 0x00,
3430  0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x3E, 0xE8, 0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
3431  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3432  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3433  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3434  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3435  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xE7, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00,
3436  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0xB2, 0xE7, 0xFF, 0xFF,
3437  0x00, 0x00, 0x00, 0x03, 0x64, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xC2, 0xE8, 0xFF, 0xFF, 0x04, 0x00,
3438  0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3439  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3440  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3441  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3442  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xE8, 0xFF, 0xFF,
3443  0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x14, 0x00,
3444  0x00, 0x00, 0x36, 0xE8, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x03, 0x14, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
3445  0x46, 0xE9, 0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3446  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3447  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3448  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3449  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3450  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3451  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3452  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3453  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3454  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3455  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3456  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3457  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3458  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3459  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3460  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3461  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3462  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3463  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3464  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3465  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3466  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3467  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3468  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3469  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3470  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3471  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3472  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3473  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3474  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3475  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3476  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3477  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3478  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3479  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3480  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3481  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3482  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3483  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3484  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3485  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3486  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3487  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3488  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3489  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3490  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3491  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3492  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3493  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3494  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3495  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3496  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3497  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3498  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3499  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3500  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3501  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3502  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3503  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3504  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3505  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3506  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3507  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3508  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3509  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3510  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3511  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3512  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3513  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3514  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3515  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3516  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0xED, 0xFF, 0xFF,
3517  0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x14, 0x00,
3518  0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x6E, 0xED, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x03, 0x14, 0x05, 0x00, 0x00,
3519  0x04, 0x00, 0x00, 0x00, 0x7E, 0xEE, 0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00,
3520  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3521  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3522  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3523  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3524  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3525  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3526  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3527  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3528  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3529  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3530  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3531  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3532  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3533  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3534  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3535  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3536  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3537  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3538  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3539  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3540  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3541  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3542  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3543  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3544  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3545  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3546  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3547  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3548  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3549  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3550  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3551  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3552  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3553  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3554  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3555  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3556  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3557  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3558  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3559  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3560  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3561  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3562  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3563  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3564  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3565  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3566  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3567  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3568  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3569  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3570  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3571  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3572  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3573  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3574  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3575  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3576  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3577  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3578  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3579  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3580  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3581  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3582  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3583  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3584  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3585  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3586  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3587  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3588  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3589  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3590  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3591  0x8A, 0xF2, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
3592  0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xA6, 0xF2, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x03,
3593  0x14, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xB6, 0xF3, 0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0x40, 0x01,
3594  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3595  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3596  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3597  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3598  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3599  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3600  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3601  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3602  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3603  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3604  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3605  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3606  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3607  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3608  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3609  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3610  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3611  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3612  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3613  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3614  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3615  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3616  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3617  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3618  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3619  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3620  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3621  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3622  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3623  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3624  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3625  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3626  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3627  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3628  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3629  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3630  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3631  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3632  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3633  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3634  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3635  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3636  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3637  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3638  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3639  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3640  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3641  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3642  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3643  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3644  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3645  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3646  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3647  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3648  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3649  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3650  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3651  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3652  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3653  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3654  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3655  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3656  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3657  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3658  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3659  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3660  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3661  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3662  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3663  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3664  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3665  0x00, 0x00, 0x00, 0x00, 0xC2, 0xF7, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
3666  0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xDE, 0xF7, 0xFF, 0xFF,
3667  0x00, 0x00, 0x00, 0x03, 0xA4, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xEE, 0xF8, 0xFF, 0xFF, 0x04, 0x00,
3668  0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3669  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3670  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3671  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3672  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3673  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3674  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3675  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3676  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3677  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3678  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3679  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3680  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3681  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3682  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3683  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3684  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3685  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3686  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3687  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3688  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3689  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3690  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8A, 0xF9, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01,
3691  0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x05, 0x00,
3692  0x00, 0x00, 0xA6, 0xF9, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x03, 0xA4, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
3693  0xB6, 0xFA, 0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3694  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3695  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3696  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3697  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3698  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3699  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3700  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3701  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3702  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3703  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3704  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3705  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3706  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3707  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3708  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3709  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3710  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3711  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3712  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3713  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3714  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3715  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0xFB,
3716  0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
3717  0x14, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x6E, 0xFB, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x03, 0xA4, 0x01,
3718  0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x7E, 0xFC, 0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 0x00,
3719  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3720  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3721  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3722  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3723  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3724  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3725  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3726  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3727  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3728  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3729  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3730  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3731  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3732  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3733  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3734  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3735  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3736  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3737  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3738  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3739  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3740  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3741  0x00, 0x00, 0x00, 0x00, 0x1A, 0xFD, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
3742  0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x10, 0x00, 0x0C, 0x00,
3743  0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
3744  0x01, 0x01, 0x04, 0x00, 0x00, 0x00, 0x2E, 0xFE, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
3745  0x22, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6C, 0x73,
3746  0x74, 0x6D, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xEC, 0x00, 0x00, 0x00, 0xD0, 0x00, 0x00, 0x00,
3747  0xB4, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x30, 0x00,
3748  0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x14, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
3749  0xA6, 0xFD, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
3750  0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x3C, 0xFF, 0xFF, 0xFF, 0x02, 0x00, 0x00, 0x00,
3751  0x04, 0x00, 0x00, 0x00, 0xCE, 0xFD, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
3752  0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x64, 0xFF, 0xFF, 0xFF,
3753  0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xF6, 0xFD, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00,
3754  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
3755  0xB4, 0xFE, 0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0x1A, 0xFE, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00,
3756  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
3757  0xF0, 0xFF, 0xFF, 0xFF, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
3758  0x10, 0x00, 0x04, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
3759  0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
3760  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE8, 0xFE, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00,
3761  0x7E, 0xFF, 0xFF, 0xFF, 0x0C, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x04, 0x00, 0x08, 0x00, 0x08, 0x00,
3762  0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x76, 0xFF, 0xFF, 0xFF, 0x02, 0x00, 0x00, 0x00,
3763  0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
3764  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
3765  0x68, 0xFF, 0xFF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0xCE, 0xFE, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00,
3766  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
3767  0x08, 0x00, 0x0E, 0x00, 0x07, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x0C, 0x00,
3768  0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x08, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00,
3769  0x08, 0x00, 0x0E, 0x00, 0x04, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x01, 0x00,
3770  0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x18, 0x00, 0x04, 0x00, 0x08, 0x00, 0x0C, 0x00, 0x10, 0x00, 0x14, 0x00,
3771  0x0E, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00,
3772  0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3773  0x01, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x00,
3774  0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x6E, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00,
3775  0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x08, 0x00,
3776  0x0C, 0x00, 0x07, 0x00, 0x08, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00,
3777  0xF6, 0xFF, 0xFF, 0xFF, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x0A, 0x00, 0x04, 0x00, 0x06, 0x00,
3778  0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x14, 0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x00,
3779  0x0C, 0x00, 0x10, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00,
3780  0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3781  0x01, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x04, 0x00, 0x08, 0x00,
3782  0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x10, 0x00, 0x08, 0x00, 0x07, 0x00, 0x0C, 0x00,
3783  0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
3784  0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00
3785  };
3786 
3787  armnn::INetworkPtr deserializedNetwork =
3788  DeserializeNetwork(std::string(lstmNoCifgWithPeepholeAndProjectionModel.begin(),
3789  lstmNoCifgWithPeepholeAndProjectionModel.end()));
3790 
3791  BOOST_CHECK(deserializedNetwork);
3792 
3793  // generating the same model parameters which where used to serialize the model (Layer norm is not specified)
3794  armnn::LstmDescriptor descriptor;
3795  descriptor.m_ActivationFunc = 4;
3796  descriptor.m_ClippingThresProj = 0.0f;
3797  descriptor.m_ClippingThresCell = 0.0f;
3798  descriptor.m_CifgEnabled = false;
3799  descriptor.m_ProjectionEnabled = true;
3800  descriptor.m_PeepholeEnabled = true;
3801 
3802  const uint32_t batchSize = 2u;
3803  const uint32_t inputSize = 5u;
3804  const uint32_t numUnits = 20u;
3805  const uint32_t outputSize = 16u;
3806 
3807  armnn::TensorInfo tensorInfo20x5({numUnits, inputSize}, armnn::DataType::Float32);
3808  std::vector<float> inputToInputWeightsData(tensorInfo20x5.GetNumElements(), 0.0f);
3809  armnn::ConstTensor inputToInputWeights(tensorInfo20x5, inputToInputWeightsData);
3810 
3811  std::vector<float> inputToForgetWeightsData(tensorInfo20x5.GetNumElements(), 0.0f);
3812  armnn::ConstTensor inputToForgetWeights(tensorInfo20x5, inputToForgetWeightsData);
3813 
3814  std::vector<float> inputToCellWeightsData(tensorInfo20x5.GetNumElements(), 0.0f);
3815  armnn::ConstTensor inputToCellWeights(tensorInfo20x5, inputToCellWeightsData);
3816 
3817  std::vector<float> inputToOutputWeightsData(tensorInfo20x5.GetNumElements(), 0.0f);
3818  armnn::ConstTensor inputToOutputWeights(tensorInfo20x5, inputToOutputWeightsData);
3819 
3820  armnn::TensorInfo tensorInfo20({numUnits}, armnn::DataType::Float32);
3821  std::vector<float> inputGateBiasData(tensorInfo20.GetNumElements(), 0.0f);
3822  armnn::ConstTensor inputGateBias(tensorInfo20, inputGateBiasData);
3823 
3824  std::vector<float> forgetGateBiasData(tensorInfo20.GetNumElements(), 0.0f);
3825  armnn::ConstTensor forgetGateBias(tensorInfo20, forgetGateBiasData);
3826 
3827  std::vector<float> cellBiasData(tensorInfo20.GetNumElements(), 0.0f);
3828  armnn::ConstTensor cellBias(tensorInfo20, cellBiasData);
3829 
3830  std::vector<float> outputGateBiasData(tensorInfo20.GetNumElements(), 0.0f);
3831  armnn::ConstTensor outputGateBias(tensorInfo20, outputGateBiasData);
3832 
3833  armnn::TensorInfo tensorInfo20x16({numUnits, outputSize}, armnn::DataType::Float32);
3834  std::vector<float> recurrentToInputWeightsData(tensorInfo20x16.GetNumElements(), 0.0f);
3835  armnn::ConstTensor recurrentToInputWeights(tensorInfo20x16, recurrentToInputWeightsData);
3836 
3837  std::vector<float> recurrentToForgetWeightsData(tensorInfo20x16.GetNumElements(), 0.0f);
3838  armnn::ConstTensor recurrentToForgetWeights(tensorInfo20x16, recurrentToForgetWeightsData);
3839 
3840  std::vector<float> recurrentToCellWeightsData(tensorInfo20x16.GetNumElements(), 0.0f);
3841  armnn::ConstTensor recurrentToCellWeights(tensorInfo20x16, recurrentToCellWeightsData);
3842 
3843  std::vector<float> recurrentToOutputWeightsData(tensorInfo20x16.GetNumElements(), 0.0f);
3844  armnn::ConstTensor recurrentToOutputWeights(tensorInfo20x16, recurrentToOutputWeightsData);
3845 
3846  std::vector<float> cellToInputWeightsData(tensorInfo20.GetNumElements(), 0.0f);
3847  armnn::ConstTensor cellToInputWeights(tensorInfo20, cellToInputWeightsData);
3848 
3849  std::vector<float> cellToForgetWeightsData(tensorInfo20.GetNumElements(), 0.0f);
3850  armnn::ConstTensor cellToForgetWeights(tensorInfo20, cellToForgetWeightsData);
3851 
3852  std::vector<float> cellToOutputWeightsData(tensorInfo20.GetNumElements(), 0.0f);
3853  armnn::ConstTensor cellToOutputWeights(tensorInfo20, cellToOutputWeightsData);
3854 
3855  armnn::TensorInfo tensorInfo16x20({outputSize, numUnits}, armnn::DataType::Float32);
3856  std::vector<float> projectionWeightsData(tensorInfo16x20.GetNumElements(), 0.0f);
3857  armnn::ConstTensor projectionWeights(tensorInfo16x20, projectionWeightsData);
3858 
3859  armnn::TensorInfo tensorInfo16({outputSize}, armnn::DataType::Float32);
3860  std::vector<float> projectionBiasData(outputSize, 0.0f);
3861  armnn::ConstTensor projectionBias(tensorInfo16, projectionBiasData);
3862 
3863  armnn::LstmInputParams params;
3864  params.m_InputToForgetWeights = &inputToForgetWeights;
3865  params.m_InputToCellWeights = &inputToCellWeights;
3866  params.m_InputToOutputWeights = &inputToOutputWeights;
3867  params.m_RecurrentToForgetWeights = &recurrentToForgetWeights;
3868  params.m_RecurrentToCellWeights = &recurrentToCellWeights;
3869  params.m_RecurrentToOutputWeights = &recurrentToOutputWeights;
3870  params.m_ForgetGateBias = &forgetGateBias;
3871  params.m_CellBias = &cellBias;
3872  params.m_OutputGateBias = &outputGateBias;
3873 
3874  // additional params because: descriptor.m_CifgEnabled = false
3875  params.m_InputToInputWeights = &inputToInputWeights;
3876  params.m_RecurrentToInputWeights = &recurrentToInputWeights;
3877  params.m_CellToInputWeights = &cellToInputWeights;
3878  params.m_InputGateBias = &inputGateBias;
3879 
3880  // additional params because: descriptor.m_ProjectionEnabled = true
3881  params.m_ProjectionWeights = &projectionWeights;
3882  params.m_ProjectionBias = &projectionBias;
3883 
3884  // additional params because: descriptor.m_PeepholeEnabled = true
3885  params.m_CellToForgetWeights = &cellToForgetWeights;
3886  params.m_CellToOutputWeights = &cellToOutputWeights;
3887 
3888  const std::string layerName("lstm");
3889  armnn::TensorInfo inputTensorInfo({ batchSize, inputSize }, armnn::DataType::Float32);
3890  armnn::TensorInfo cellStateTensorInfo({ batchSize, numUnits}, armnn::DataType::Float32);
3891  armnn::TensorInfo outputStateTensorInfo({ batchSize, outputSize }, armnn::DataType::Float32);
3892  armnn::TensorInfo lstmTensorInfoScratchBuff({ batchSize, numUnits * 4 }, armnn::DataType::Float32);
3893 
3894  VerifyLstmLayer checker(
3895  layerName,
3896  {inputTensorInfo, outputStateTensorInfo, cellStateTensorInfo},
3897  {lstmTensorInfoScratchBuff, outputStateTensorInfo, cellStateTensorInfo, outputStateTensorInfo},
3898  descriptor,
3899  params);
3900  deserializedNetwork->Accept(checker);
3901 }
bool m_ProjectionEnabled
Enable/disable the projection layer.
const ConstTensor * m_ProjectionWeights
Definition: LstmParams.hpp:55
const ConstTensor * m_CellBias
Definition: LstmParams.hpp:53
float m_ClippingThresProj
Clipping threshold value for the projection.
const ConstTensor * m_CellToOutputWeights
Definition: LstmParams.hpp:50
const ConstTensor * m_CellToInputWeights
Definition: LstmParams.hpp:48
const ConstTensor * m_InputGateBias
Definition: LstmParams.hpp:51
const ConstTensor * m_RecurrentToCellWeights
Definition: LstmParams.hpp:46
const ConstTensor * m_CellToForgetWeights
Definition: LstmParams.hpp:49
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
const ConstTensor * m_OutputGateBias
Definition: LstmParams.hpp:54
const ConstTensor * m_RecurrentToOutputWeights
Definition: LstmParams.hpp:47
An LstmDescriptor for the LstmLayer.
const ConstTensor * m_ProjectionBias
Definition: LstmParams.hpp:56
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
Definition: Tensor.hpp:199
bool m_PeepholeEnabled
Enable/disable peephole.
uint32_t m_ActivationFunc
The activation function to use.
float m_ClippingThresCell
Clipping threshold value for the cell state.
const ConstTensor * m_ForgetGateBias
Definition: LstmParams.hpp:52
const ConstTensor * m_InputToCellWeights
Definition: LstmParams.hpp:42
const ConstTensor * m_InputToOutputWeights
Definition: LstmParams.hpp:43
bool m_CifgEnabled
Enable/disable cifg (coupled input & forget gate).
const ConstTensor * m_RecurrentToForgetWeights
Definition: LstmParams.hpp:45
const ConstTensor * m_RecurrentToInputWeights
Definition: LstmParams.hpp:44
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
const ConstTensor * m_InputToForgetWeights
Definition: LstmParams.hpp:41
const ConstTensor * m_InputToInputWeights
Definition: LstmParams.hpp:40

◆ BOOST_AUTO_TEST_CASE() [60/60]

BOOST_AUTO_TEST_CASE ( SerializeDeserializeQuantizedLstm  )

Definition at line 3953 of file SerializerTests.cpp.

References BOOST_AUTO_TEST_SUITE_END(), BOOST_CHECK(), IOutputSlot::Connect(), INetwork::Create(), IConnectableLayer::GetInputSlot(), IConnectableLayer::GetOutputSlot(), 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, QuantizedLstmInputParams::m_RecurrentToOutputWeights, armnn::QAsymmU8, armnn::QSymmS16, IOutputSlot::SetTensorInfo(), and armnn::Signed32.

3954 {
3955  const uint32_t batchSize = 1;
3956  const uint32_t inputSize = 2;
3957  const uint32_t numUnits = 4;
3958  const uint32_t outputSize = numUnits;
3959 
3960  // Scale/Offset for input/output, cellState In/Out, weights, bias
3961  float inputOutputScale = 0.0078125f;
3962  int32_t inputOutputOffset = 128;
3963 
3964  float cellStateScale = 0.00048828125f;
3965  int32_t cellStateOffset = 0;
3966 
3967  float weightsScale = 0.00408021f;
3968  int32_t weightsOffset = 100;
3969 
3970  float biasScale = 3.1876640625e-05f;
3971  int32_t biasOffset = 0;
3972 
3973  // The shape of weight data is {outputSize, inputSize} = {4, 2}
3974  armnn::TensorShape inputToInputWeightsShape = {4, 2};
3975  std::vector<uint8_t> inputToInputWeightsData = {1, 2, 3, 4, 5, 6, 7, 8};
3976  armnn::TensorInfo inputToInputWeightsInfo(inputToInputWeightsShape,
3978  weightsScale,
3979  weightsOffset);
3980  armnn::ConstTensor inputToInputWeights(inputToInputWeightsInfo, inputToInputWeightsData);
3981 
3982  armnn::TensorShape inputToForgetWeightsShape = {4, 2};
3983  std::vector<uint8_t> inputToForgetWeightsData = {1, 2, 3, 4, 5, 6, 7, 8};
3984  armnn::TensorInfo inputToForgetWeightsInfo(inputToForgetWeightsShape,
3986  weightsScale,
3987  weightsOffset);
3988  armnn::ConstTensor inputToForgetWeights(inputToForgetWeightsInfo, inputToForgetWeightsData);
3989 
3990  armnn::TensorShape inputToCellWeightsShape = {4, 2};
3991  std::vector<uint8_t> inputToCellWeightsData = {1, 2, 3, 4, 5, 6, 7, 8};
3992  armnn::TensorInfo inputToCellWeightsInfo(inputToCellWeightsShape,
3994  weightsScale,
3995  weightsOffset);
3996  armnn::ConstTensor inputToCellWeights(inputToCellWeightsInfo, inputToCellWeightsData);
3997 
3998  armnn::TensorShape inputToOutputWeightsShape = {4, 2};
3999  std::vector<uint8_t> inputToOutputWeightsData = {1, 2, 3, 4, 5, 6, 7, 8};
4000  armnn::TensorInfo inputToOutputWeightsInfo(inputToOutputWeightsShape,
4002  weightsScale,
4003  weightsOffset);
4004  armnn::ConstTensor inputToOutputWeights(inputToOutputWeightsInfo, inputToOutputWeightsData);
4005 
4006  // The shape of recurrent weight data is {outputSize, outputSize} = {4, 4}
4007  armnn::TensorShape recurrentToInputWeightsShape = {4, 4};
4008  std::vector<uint8_t> recurrentToInputWeightsData = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
4009  armnn::TensorInfo recurrentToInputWeightsInfo(recurrentToInputWeightsShape,
4011  weightsScale,
4012  weightsOffset);
4013  armnn::ConstTensor recurrentToInputWeights(recurrentToInputWeightsInfo, recurrentToInputWeightsData);
4014 
4015  armnn::TensorShape recurrentToForgetWeightsShape = {4, 4};
4016  std::vector<uint8_t> recurrentToForgetWeightsData = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
4017  armnn::TensorInfo recurrentToForgetWeightsInfo(recurrentToForgetWeightsShape,
4019  weightsScale,
4020  weightsOffset);
4021  armnn::ConstTensor recurrentToForgetWeights(recurrentToForgetWeightsInfo, recurrentToForgetWeightsData);
4022 
4023  armnn::TensorShape recurrentToCellWeightsShape = {4, 4};
4024  std::vector<uint8_t> recurrentToCellWeightsData = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
4025  armnn::TensorInfo recurrentToCellWeightsInfo(recurrentToCellWeightsShape,
4027  weightsScale,
4028  weightsOffset);
4029  armnn::ConstTensor recurrentToCellWeights(recurrentToCellWeightsInfo, recurrentToCellWeightsData);
4030 
4031  armnn::TensorShape recurrentToOutputWeightsShape = {4, 4};
4032  std::vector<uint8_t> recurrentToOutputWeightsData = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
4033  armnn::TensorInfo recurrentToOutputWeightsInfo(recurrentToOutputWeightsShape,
4035  weightsScale,
4036  weightsOffset);
4037  armnn::ConstTensor recurrentToOutputWeights(recurrentToOutputWeightsInfo, recurrentToOutputWeightsData);
4038 
4039  // The shape of bias data is {outputSize} = {4}
4040  armnn::TensorShape inputGateBiasShape = {4};
4041  std::vector<int32_t> inputGateBiasData = {1, 2, 3, 4};
4042  armnn::TensorInfo inputGateBiasInfo(inputGateBiasShape,
4044  biasScale,
4045  biasOffset);
4046  armnn::ConstTensor inputGateBias(inputGateBiasInfo, inputGateBiasData);
4047 
4048  armnn::TensorShape forgetGateBiasShape = {4};
4049  std::vector<int32_t> forgetGateBiasData = {1, 2, 3, 4};
4050  armnn::TensorInfo forgetGateBiasInfo(forgetGateBiasShape,
4052  biasScale,
4053  biasOffset);
4054  armnn::ConstTensor forgetGateBias(forgetGateBiasInfo, forgetGateBiasData);
4055 
4056  armnn::TensorShape cellBiasShape = {4};
4057  std::vector<int32_t> cellBiasData = {1, 2, 3, 4};
4058  armnn::TensorInfo cellBiasInfo(cellBiasShape,
4060  biasScale,
4061  biasOffset);
4062  armnn::ConstTensor cellBias(cellBiasInfo, cellBiasData);
4063 
4064  armnn::TensorShape outputGateBiasShape = {4};
4065  std::vector<int32_t> outputGateBiasData = {1, 2, 3, 4};
4066  armnn::TensorInfo outputGateBiasInfo(outputGateBiasShape,
4068  biasScale,
4069  biasOffset);
4070  armnn::ConstTensor outputGateBias(outputGateBiasInfo, outputGateBiasData);
4071 
4073  params.m_InputToInputWeights = &inputToInputWeights;
4074  params.m_InputToForgetWeights = &inputToForgetWeights;
4075  params.m_InputToCellWeights = &inputToCellWeights;
4076  params.m_InputToOutputWeights = &inputToOutputWeights;
4077  params.m_RecurrentToInputWeights = &recurrentToInputWeights;
4078  params.m_RecurrentToForgetWeights = &recurrentToForgetWeights;
4079  params.m_RecurrentToCellWeights = &recurrentToCellWeights;
4080  params.m_RecurrentToOutputWeights = &recurrentToOutputWeights;
4081  params.m_InputGateBias = &inputGateBias;
4082  params.m_ForgetGateBias = &forgetGateBias;
4083  params.m_CellBias = &cellBias;
4084  params.m_OutputGateBias = &outputGateBias;
4085 
4087  armnn::IConnectableLayer* const inputLayer = network->AddInputLayer(0);
4088  armnn::IConnectableLayer* const cellStateIn = network->AddInputLayer(1);
4089  armnn::IConnectableLayer* const outputStateIn = network->AddInputLayer(2);
4090  const std::string layerName("QuantizedLstm");
4091  armnn::IConnectableLayer* const quantizedLstmLayer = network->AddQuantizedLstmLayer(params, layerName.c_str());
4092  armnn::IConnectableLayer* const cellStateOut = network->AddOutputLayer(0);
4093  armnn::IConnectableLayer* const outputLayer = network->AddOutputLayer(1);
4094 
4095  // Connect up
4096  armnn::TensorInfo inputTensorInfo({ batchSize, inputSize },
4098  inputOutputScale,
4099  inputOutputOffset);
4100  armnn::TensorInfo cellStateTensorInfo({ batchSize, numUnits },
4102  cellStateScale,
4103  cellStateOffset);
4104  armnn::TensorInfo outputStateTensorInfo({ batchSize, outputSize },
4106  inputOutputScale,
4107  inputOutputOffset);
4108 
4109  inputLayer->GetOutputSlot(0).Connect(quantizedLstmLayer->GetInputSlot(0));
4110  inputLayer->GetOutputSlot(0).SetTensorInfo(inputTensorInfo);
4111 
4112  cellStateIn->GetOutputSlot(0).Connect(quantizedLstmLayer->GetInputSlot(1));
4113  cellStateIn->GetOutputSlot(0).SetTensorInfo(cellStateTensorInfo);
4114 
4115  outputStateIn->GetOutputSlot(0).Connect(quantizedLstmLayer->GetInputSlot(2));
4116  outputStateIn->GetOutputSlot(0).SetTensorInfo(outputStateTensorInfo);
4117 
4118  quantizedLstmLayer->GetOutputSlot(0).Connect(cellStateOut->GetInputSlot(0));
4119  quantizedLstmLayer->GetOutputSlot(0).SetTensorInfo(cellStateTensorInfo);
4120 
4121  quantizedLstmLayer->GetOutputSlot(1).Connect(outputLayer->GetInputSlot(0));
4122  quantizedLstmLayer->GetOutputSlot(1).SetTensorInfo(outputStateTensorInfo);
4123 
4124  armnn::INetworkPtr deserializedNetwork = DeserializeNetwork(SerializeNetwork(*network));
4125  BOOST_CHECK(deserializedNetwork);
4126 
4127  VerifyQuantizedLstmLayer checker(layerName,
4128  {inputTensorInfo, cellStateTensorInfo, outputStateTensorInfo},
4129  {cellStateTensorInfo, outputStateTensorInfo},
4130  params);
4131 
4132  deserializedNetwork->Accept(checker);
4133 }
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
Definition: INetwork.hpp:61
const ConstTensor * m_RecurrentToOutputWeights
const ConstTensor * m_RecurrentToForgetWeights
BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)
virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0
const ConstTensor * m_InputToForgetWeights
A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.
Definition: Tensor.hpp:199
const ConstTensor * m_RecurrentToInputWeights
const ConstTensor * m_RecurrentToCellWeights
virtual const IInputSlot & GetInputSlot(unsigned int index) const =0
Get a const input slot handle by slot index.
const ConstTensor * m_InputToOutputWeights
virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0
Get the const output slot handle by slot index.
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
virtual int Connect(IInputSlot &destination)=0
static INetworkPtr Create()
Definition: Network.cpp:49