diff options
Diffstat (limited to 'src/armnn/Layer.hpp')
-rw-r--r-- | src/armnn/Layer.hpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/armnn/Layer.hpp b/src/armnn/Layer.hpp index 1160f0ab09..f9f2f22bea 100644 --- a/src/armnn/Layer.hpp +++ b/src/armnn/Layer.hpp @@ -10,6 +10,7 @@ #include "backends/WorkloadDataCollector.hpp" #include "backends/WorkloadInfo.hpp" #include "InternalTypes.hpp" +#include "SerializeLayerParameters.hpp" #include <armnn/Types.hpp> #include <armnn/Tensor.hpp> @@ -218,6 +219,10 @@ public: virtual void ValidateTensorShapesFromInputs() = 0; + /// Helper to serialize the layer parameters to string + /// (currently used in DotSerializer and company) + virtual void SerializeLayerParameters(ParameterStringifyFunction & fn) const {} + // IConnectableLayer const char* GetName() const override { return m_LayerName.c_str(); } @@ -230,6 +235,9 @@ public: const OutputSlot& GetOutputSlot(unsigned int index = 0) const override { return m_OutputSlots.at(index); } OutputSlot& GetOutputSlot(unsigned int index = 0) override { return m_OutputSlots.at(index); } + void SetGuid(LayerGuid guid) { m_Guid = guid; } + LayerGuid GetGuid() const final { return m_Guid; } + protected: // Graph needs access to the virtual destructor friend class Graph; @@ -281,6 +289,8 @@ private: /// Used for sorting mutable LayerPriority m_Priority = 0; mutable bool m_Visiting = false; + + LayerGuid m_Guid; }; // A layer user-provided data can be bound to (e.g. inputs, outputs) |