diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/armnn/Descriptors.hpp | 7 | ||||
-rw-r--r-- | include/armnn/DescriptorsFwd.hpp | 1 | ||||
-rw-r--r-- | include/armnn/INetwork.hpp | 9 | ||||
-rw-r--r-- | include/armnn/LayerSupport.hpp | 7 |
4 files changed, 23 insertions, 1 deletions
diff --git a/include/armnn/Descriptors.hpp b/include/armnn/Descriptors.hpp index dfd532f633..7fd36d5873 100644 --- a/include/armnn/Descriptors.hpp +++ b/include/armnn/Descriptors.hpp @@ -351,7 +351,12 @@ struct MeanDescriptor struct PadDescriptor { - PadDescriptor(const std::vector<std::pair<unsigned int, unsigned int>>& padList); + PadDescriptor() + {} + + PadDescriptor(const std::vector<std::pair<unsigned int, unsigned int>>& padList) + : m_PadList(padList) + {} // first is number of values to add before the tensor in the dimension, // second is the number of values to add after the tensor in the dimension diff --git a/include/armnn/DescriptorsFwd.hpp b/include/armnn/DescriptorsFwd.hpp index b161df8827..9cb3463b28 100644 --- a/include/armnn/DescriptorsFwd.hpp +++ b/include/armnn/DescriptorsFwd.hpp @@ -16,6 +16,7 @@ struct LstmDescriptor; struct PermuteDescriptor; struct NormalizationDescriptor; struct MeanDescriptor; +struct PadDescriptor; struct Pooling2dDescriptor; struct ReshapeDescriptor; struct ResizeBilinearDescriptor; diff --git a/include/armnn/INetwork.hpp b/include/armnn/INetwork.hpp index 7fd7a25b60..1d2679aabb 100644 --- a/include/armnn/INetwork.hpp +++ b/include/armnn/INetwork.hpp @@ -285,6 +285,15 @@ public: /// @ return - Interface for configuring the layer. virtual IConnectableLayer* AddMeanLayer(const MeanDescriptor& meanDescriptor, const char* name = nullptr) = 0; + /// Adds a fully pad layer to the network. + /// @param paddings - n by 2 tensor, where n is the rank of the input tensor, + /// such that paddings[i,0] indicates the amount of padding to add in front of dimonsion i, and + /// paddings[i,1] indicates the amount of padding to add after the end of dimension i + /// @param name - Optional name for the layer. + /// @return - Interface for configuring the layer. + virtual IConnectableLayer* AddPadLayer(const PadDescriptor& padDescriptor, + const char* name = nullptr) = 0; + protected: ~INetwork() {} }; diff --git a/include/armnn/LayerSupport.hpp b/include/armnn/LayerSupport.hpp index d00691fad1..3c7cce5c64 100644 --- a/include/armnn/LayerSupport.hpp +++ b/include/armnn/LayerSupport.hpp @@ -203,4 +203,11 @@ bool IsMeanSupported(Compute compute, char* reasonIfUnsupported = nullptr, size_t reasonIfUnsupportedMaxLength = 1024); +bool IsPadSupported(Compute compute, + const TensorInfo& input, + const TensorInfo& output, + const PadDescriptor& descriptor, + char* reasonIfUnsupported = nullptr, + size_t reasonIfUnsupportedMaxLength = 1024); + } |