diff options
Diffstat (limited to 'include/armnn')
-rw-r--r-- | include/armnn/ILayerVisitor.hpp | 13 | ||||
-rw-r--r-- | include/armnn/INetwork.hpp | 3 |
2 files changed, 16 insertions, 0 deletions
diff --git a/include/armnn/ILayerVisitor.hpp b/include/armnn/ILayerVisitor.hpp index dd73a6fb44..c56be81bb2 100644 --- a/include/armnn/ILayerVisitor.hpp +++ b/include/armnn/ILayerVisitor.hpp @@ -13,6 +13,10 @@ namespace armnn { class ILayerVisitor { +protected: + ILayerVisitor() {} + virtual ~ILayerVisitor() {} + public: /// Function that an InputLayer should call back to when its Accept(ILayerVisitor&) function is invoked. /// @param layer - pointer to the layer which is calling back to this visit function. @@ -58,6 +62,15 @@ public: const ConstTensor& weights, const char* name = nullptr) = 0; + /// Function that a Detection PostProcess layer should call back to when its + /// Accept(ILayerVisitor&) function is invoked. + /// @param layer - pointer to the layer which is calling back to this visit function. + /// @param descriptor - Description of the Detection PostProcess layer. + /// @param name - Optional name for the layer. + virtual void VisitDetectionPostProcessLayer(const IConnectableLayer* layer, + const DetectionPostProcessDescriptor& descriptor, + const char* name = nullptr) = 0; + /// Function that a 2D depthwise convolution layer with biases should call back to when its /// Accept(ILayerVisitor&) function is invoked. /// @param layer - pointer to the layer which is calling back to this visit function. diff --git a/include/armnn/INetwork.hpp b/include/armnn/INetwork.hpp index 1f7354dd35..2213cee555 100644 --- a/include/armnn/INetwork.hpp +++ b/include/armnn/INetwork.hpp @@ -8,6 +8,7 @@ #include <armnn/DescriptorsFwd.hpp> #include <armnn/TensorFwd.hpp> #include <armnn/Optional.hpp> +#include <armnn/ILayerVisitor.hpp> #include <armnn/Types.hpp> @@ -70,6 +71,8 @@ public: virtual std::vector<TensorShape> InferOutputShapes(const std::vector<TensorShape>& inputShapes) const = 0; virtual LayerGuid GetGuid() const = 0; + + virtual void Accept(ILayerVisitor& visitor) const = 0; protected: /// Objects are not deletable via the handle ~IConnectableLayer() {} |