diff options
author | Nattapat Chaimanowong <nattapat.chaimanowong@arm.com> | 2019-03-28 09:56:53 +0000 |
---|---|---|
committer | Nattapat Chaimanowong <nattapat.chaimanowong@arm.com> | 2019-03-28 11:18:00 +0000 |
commit | e4294fd7363fd2f5a7be25d1722f20ed935d3445 (patch) | |
tree | b1ebf691cc66e447706081c956a50ce1b4c18e99 /include | |
parent | 61f54634701d070dbf48e082993fa58104d6f329 (diff) | |
download | armnn-e4294fd7363fd2f5a7be25d1722f20ed935d3445.tar.gz |
IVGCVSW-2874 Add DequantizeLayer and no-op factory method
*Add Dequantize layer to the frontend
*Add Serializer and Deserializer for Dequantize
Change-Id: Ide2647b9e0348d599deb97e61ca4bf66e2f17fc0
Signed-off-by: Nattapat Chaimanowong <nattapat.chaimanowong@arm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/armnn/ILayerSupport.hpp | 4 | ||||
-rw-r--r-- | include/armnn/ILayerVisitor.hpp | 7 | ||||
-rw-r--r-- | include/armnn/INetwork.hpp | 4 | ||||
-rw-r--r-- | include/armnn/LayerSupport.hpp | 7 | ||||
-rw-r--r-- | include/armnn/LayerVisitorBase.hpp | 4 |
5 files changed, 25 insertions, 1 deletions
diff --git a/include/armnn/ILayerSupport.hpp b/include/armnn/ILayerSupport.hpp index 4794a219e7..fe440719b0 100644 --- a/include/armnn/ILayerSupport.hpp +++ b/include/armnn/ILayerSupport.hpp @@ -77,6 +77,10 @@ public: const Optional<TensorInfo>& biases, Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0; + virtual bool IsDequantizeSupported(const TensorInfo& input, + const TensorInfo& output, + Optional<std::string&> reasonIfUnsupported = EmptyOptional()) const = 0; + virtual bool IsDetectionPostProcessSupported( const TensorInfo& input0, const TensorInfo& input1, diff --git a/include/armnn/ILayerVisitor.hpp b/include/armnn/ILayerVisitor.hpp index a39cbd10b9..e23cf5e6dd 100644 --- a/include/armnn/ILayerVisitor.hpp +++ b/include/armnn/ILayerVisitor.hpp @@ -95,6 +95,13 @@ public: const Optional<ConstTensor>& biases, const char* name = nullptr) = 0; + /// Function that a Dequantize 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 name - Optional name for the layer. + virtual void VisitDequantizeLayer(const IConnectableLayer* layer, + 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. diff --git a/include/armnn/INetwork.hpp b/include/armnn/INetwork.hpp index 7c1fbdbd49..5a9d4f246e 100644 --- a/include/armnn/INetwork.hpp +++ b/include/armnn/INetwork.hpp @@ -147,6 +147,10 @@ public: const ConstTensor& biases, const char* name = nullptr) = 0; + /// Adds a Dequantize layer to the network. + /// @return - Interface for configuring the layer. + virtual IConnectableLayer* AddDequantizeLayer(const char* name = nullptr) = 0; + /// Adds a Detection PostProcess layer to the network. /// @param descriptor - Description of the Detection PostProcess layer. /// @param anchors - Tensor for anchors. diff --git a/include/armnn/LayerSupport.hpp b/include/armnn/LayerSupport.hpp index 7b9343b5d6..7c6bc1372a 100644 --- a/include/armnn/LayerSupport.hpp +++ b/include/armnn/LayerSupport.hpp @@ -96,6 +96,13 @@ bool IsDepthwiseConvolutionSupported(const BackendId& backend, size_t reasonIfUnsupportedMaxLength = 1024); /// Deprecated in favor of IBackend and ILayerSupport interfaces +bool IsDequantizeSupported(const BackendId& backend, + const TensorInfo& input, + const TensorInfo& output, + char* reasonIfUnsupported = nullptr, + size_t reasonIfUnsupportedMaxLength = 1024); + +/// Deprecated in favor of IBackend and ILayerSupport interfaces bool IsDivisionSupported(const BackendId& backend, const TensorInfo& input0, const TensorInfo& input1, diff --git a/include/armnn/LayerVisitorBase.hpp b/include/armnn/LayerVisitorBase.hpp index d30005f0ed..a5459e1a32 100644 --- a/include/armnn/LayerVisitorBase.hpp +++ b/include/armnn/LayerVisitorBase.hpp @@ -45,6 +45,9 @@ public: const Optional<ConstTensor>&, const char*) override { DefaultPolicy::Apply(); } + void VisitDequantizeLayer(const IConnectableLayer*, + const char*) override { DefaultPolicy::Apply(); } + void VisitDetectionPostProcessLayer(const IConnectableLayer*, const DetectionPostProcessDescriptor&, const ConstTensor&, @@ -175,4 +178,3 @@ public: }; } //namespace armnn - |