aboutsummaryrefslogtreecommitdiff
path: root/src/armnnSerializer/Serializer.cpp
diff options
context:
space:
mode:
authorSadik Armagan <sadik.armagan@arm.com>2019-10-14 13:00:47 +0100
committerSadik Armagan <sadik.armagan@arm.com>2019-10-14 13:00:47 +0100
commit262578500338274b5fa0bcfeb2d72c13e717f4ff (patch)
treea7ec5fee3c7c8354540b61a37408865abfde0b5f /src/armnnSerializer/Serializer.cpp
parentc626345daafe9c0f49c88eb336d30bac5a58bf71 (diff)
downloadarmnn-262578500338274b5fa0bcfeb2d72c13e717f4ff.tar.gz
IVGCVSW-3974 Add serialization support for LOG_SOFTMAX
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I0777abc672dd7d5c9fadaed27b0e776ac591d2c7
Diffstat (limited to 'src/armnnSerializer/Serializer.cpp')
-rw-r--r--src/armnnSerializer/Serializer.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/armnnSerializer/Serializer.cpp b/src/armnnSerializer/Serializer.cpp
index 0e8c894e46..11f833c5b7 100644
--- a/src/armnnSerializer/Serializer.cpp
+++ b/src/armnnSerializer/Serializer.cpp
@@ -467,7 +467,22 @@ void SerializerVisitor::VisitLogSoftmaxLayer(const armnn::IConnectableLayer* lay
const armnn::LogSoftmaxDescriptor& logSoftmaxDescriptor,
const char* name)
{
- throw armnn::UnimplementedException("SerializerVisitor::VisitLogSoftmaxLayer() is not implemented");
+ // Create FlatBuffer BaseLayer
+ auto flatBufferLogSoftmaxBaseLayer = CreateLayerBase(layer, serializer::LayerType::LayerType_LogSoftmax);
+
+ // Create the FlatBuffer LogSoftmaxDescriptor
+ auto flatBufferLogSoftmaxDesc =
+ serializer::CreateLogSoftmaxDescriptor(m_flatBufferBuilder,
+ logSoftmaxDescriptor.m_Beta,
+ logSoftmaxDescriptor.m_Axis);
+
+ // Create the FlatBuffer LogSoftmaxLayer
+ auto flatBufferLogSoftmaxLayer =
+ serializer::CreateLogSoftmaxLayer(m_flatBufferBuilder,
+ flatBufferLogSoftmaxBaseLayer,
+ flatBufferLogSoftmaxDesc);
+
+ CreateAnyLayer(flatBufferLogSoftmaxLayer.o, serializer::Layer::Layer_LogSoftmaxLayer);
}
void SerializerVisitor::VisitLstmLayer(const armnn::IConnectableLayer* layer,