IVGCVSW-2681 Fix layer name in BatchNormalization deserialization
authorruoyan01 <ruomei.yan@arm.com>
Mon, 4 Mar 2019 14:48:02 +0000 (14:48 +0000)
committerRuomei Yan <ruomei.yan@arm.com>
Mon, 4 Mar 2019 15:38:09 +0000 (15:38 +0000)
Change-Id: Iec43db205d77dc9864abe1fe85104722a6954d57
Signed-off-by: Ruomei Yan <ruomei.yan@arm.com>
src/armnnDeserializer/Deserializer.cpp
src/armnnSerializer/test/SerializerTests.cpp

index 405d95e..04c6296 100644 (file)
@@ -877,7 +877,7 @@ void Deserializer::ParseBatchNormalization(GraphPtr graph, unsigned int layerInd
     CHECK_VALID_SIZE(outputs.size(), 1);
     auto outputInfo = ToTensorInfo(outputs[0]);
 
-    auto layerName = boost::str(boost::format("BatchNormalization:%1%") % layerIndex);
+    auto layerName = GetLayerName(graph, layerIndex);
 
     auto serializerLayer = graph->layers()->Get(layerIndex)->layer_as_BatchNormalizationLayer();
     auto serializerDescriptor = serializerLayer->descriptor();
index 2751aff..62fa0c6 100644 (file)
@@ -943,7 +943,7 @@ BOOST_AUTO_TEST_CASE(SerializeDeserializeBatchNormalization)
                                       const armnn::ConstTensor&,
                                       const char* name) override
         {
-            BOOST_TEST(name == "BatchNormalization:1");
+            BOOST_TEST(name == "BatchNormalizationLayer");
         }
     };