| 298 | } |
| 299 | |
| 300 | void SerializerStrategy::SerializeBatchNormalizationLayer( |
| 301 | const armnn::IConnectableLayer* layer, |
| 302 | const armnn::BatchNormalizationDescriptor& batchNormDescriptor, |
| 303 | const std::vector<armnn::ConstTensor>& constants, |
| 304 | const char* name) |
| 305 | { |
| 306 | IgnoreUnused(name); |
| 307 | |
| 308 | const armnn::ConstTensor& mean = constants[0]; |
| 309 | const armnn::ConstTensor& variance = constants[1]; |
| 310 | const armnn::ConstTensor& beta = constants[2]; |
| 311 | const armnn::ConstTensor& gamma = constants[3]; |
| 312 | |
| 313 | auto fbBatchNormalizationBaseLayer = CreateLayerBase(layer, serializer::LayerType::LayerType_BatchNormalization); |
| 314 | auto fbBatchNormalizationDescriptor = serializer::CreateBatchNormalizationDescriptor( |
| 315 | m_flatBufferBuilder, |
| 316 | batchNormDescriptor.m_Eps, |
| 317 | GetFlatBufferDataLayout(batchNormDescriptor.m_DataLayout)); |
| 318 | |
| 319 | auto fbMeanConstTensorInfo = CreateConstTensorInfo(mean); |
| 320 | auto fbVarianceConstTensorInfo = CreateConstTensorInfo(variance); |
| 321 | auto fbBetaConstTensorInfo = CreateConstTensorInfo(beta); |
| 322 | auto fbGammaConstTensorInfo = CreateConstTensorInfo(gamma); |
| 323 | auto fbBatchNormalizationLayer = serializer::CreateBatchNormalizationLayer(m_flatBufferBuilder, |
| 324 | fbBatchNormalizationBaseLayer, |
| 325 | fbBatchNormalizationDescriptor, |
| 326 | fbMeanConstTensorInfo, |
| 327 | fbVarianceConstTensorInfo, |
| 328 | fbBetaConstTensorInfo, |
| 329 | fbGammaConstTensorInfo); |
| 330 | |
| 331 | CreateAnyLayer(fbBatchNormalizationLayer.o, serializer::Layer::Layer_BatchNormalizationLayer); |
| 332 | } |
| 333 | |
| 334 | void SerializerStrategy::SerializeCastLayer(const armnn::IConnectableLayer* layer, |
| 335 | const char* name) |
nothing calls this directly
no test coverage detected