1 // Copyright (C) 2018-2020 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
6 * @brief a header file for internal Layers structure to describe layers information
22 #include "ie_common.h"
24 #include "ie_layers_property.hpp"
32 namespace InferenceEngine {
35 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
36 * @brief This is an internal common Layer parameter parsing arguments
38 struct INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(LayerParams) {
50 * @brief Layer precision
55 * @brief A default constructor.
59 IE_SUPPRESS_DEPRECATED_START
62 * @brief A copy constructor.
63 * @param other An object to copy.
65 LayerParams(const LayerParams & other);
68 * @brief A copy assignment operator
69 * @param other An object to copy
72 LayerParams & operator= (const LayerParams & other);
74 IE_SUPPRESS_DEPRECATED_END
77 * @brief A constructor with parameters.
78 * @param name A layer name.
79 * @param type A layer type.
80 * @param precision A layer precision.
82 LayerParams(const std::string & name, const std::string & type, Precision precision);
86 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
87 * @brief This is a base abstraction Layer - all DNN Layers inherit from this class
89 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(CNNLayer) {
91 std::shared_ptr<ngraph::Node> node;
94 * @brief A shared pointer to CNNLayer
96 IE_SUPPRESS_DEPRECATED_START
97 using Ptr = std::shared_ptr<CNNLayer>;
98 IE_SUPPRESS_DEPRECATED_END
111 * @brief Layer base operating precision
116 * @brief A vector of pointers to the output data elements of this layer in the di-graph (order matters)
118 std::vector<DataPtr> outData;
121 * @brief A vector of weak pointers to the input data elements of this layer in the di-graph (order matters)
123 std::vector<DataWeakPtr> insData;
126 * @brief If suggested to fuse - a pointer to the layer which needs to be fused with this layer
128 IE_SUPPRESS_DEPRECATED_START_WIN
130 IE_SUPPRESS_DEPRECATED_END_WIN
133 * @brief Convenience user values to store in this object as extra data
138 * @brief Layer affinity set by user.
140 std::string affinity;
142 IE_SUPPRESS_DEPRECATED_START
145 * @brief A constructor. Creates a new CNNLayer instance and initializes layer parameters with the given values.
147 * @param prms Basic common parsing parameters
149 explicit CNNLayer(const LayerParams& prms);
152 * @brief Returns the original nGraph op
153 * @return A smart pointer to nGraph op
155 std::shared_ptr<ngraph::Node> getNode() {
160 * @brief A copy constructor
161 * @param other An object to copy
163 CNNLayer(const CNNLayer& other);
165 IE_SUPPRESS_DEPRECATED_END
168 * @brief A virtual destructor
173 * @brief Sets a layer to be fused with
175 * @param layer Reference to the layer to be fused with
177 IE_SUPPRESS_DEPRECATED_START_WIN
178 void fuse(Ptr& layer) {
181 IE_SUPPRESS_DEPRECATED_END_WIN
184 * @brief Returns the first element of the input data for this layer
186 * @return A smart pointer to the input data element
188 virtual const DataPtr input() const;
191 * @brief Checks if the input data and layer data are legitimate
193 void validateLayer();
196 * @brief Parse string with float in accordance with IE rules
198 * @param str input string with float value
199 * @return float value if parsing was successful
200 * @throws InferenceEngineException in case of parsing error
202 static float ie_parse_float(const std::string& str);
205 * @brief serialize float with c_locale formating
206 * used for default values serializing
208 static std::string ie_serialize_float(float value);
211 * @brief Gets float value for the given parameter
213 * @param param name of the parameter to find
214 * @param def default value of the parameter if not found
215 * @return float value
217 float GetParamAsFloat(const char* param, float def) const;
220 * @brief Returns a float value for the given layer parameter
222 * @param param Name of the layer parameter
223 * @return A float value for the specified parameter
225 float GetParamAsFloat(const char* param) const;
228 * @brief Returns a vector of float values for the given parameter or returns the default value
230 * @param param Name of the layer parameter
231 * @param def Default value of the parameter if not found
232 * @return vector of float values
234 std::vector<float> GetParamAsFloats(const char* param, std::vector<float> def) const;
237 * @brief Returns a vector of float values for the given parameter
239 * @param param Name of the layer parameter
240 * @return vector of float values
242 std::vector<float> GetParamAsFloats(const char* param) const;
245 * @brief Returns an integer value for the given parameter or returns the default value
247 * @param param Name of the layer parameter
248 * @param def Default value of the parameter if not found
249 * @return An int value for the specified parameter
251 int GetParamAsInt(const char* param, int def) const;
254 * @brief Returns an integer value for the given parameter
256 * @param param Name of the layer parameter
257 * @return An int value for the specified parameter
259 int GetParamAsInt(const char* param) const;
262 * @brief Returns a vector of int values for the given parameter or returns the default value
264 * @param param Name of the layer parameter
265 * @param def Default value of the parameter if not found
266 * @return vector of int values
268 std::vector<int> GetParamAsInts(const char* param, std::vector<int> def) const;
271 * @brief Returns a vector of int values for the given parameter
273 * @param param Name of the layer parameter
274 * @return vector of int values
276 std::vector<int> GetParamAsInts(const char* param) const;
279 * @brief Returns an unsigned integer value for the given parameter or returns the default value
281 * @param param Name of the layer parameter
282 * @param def Default value of the parameter if not found
283 * @return An unsigned integer value for the specified parameter
285 unsigned int GetParamAsUInt(const char* param, unsigned int def) const;
288 * @brief Returns an unsigned integer value for the given parameter
290 * @param param Name of the layer parameter
291 * @return An unsigned integer value for the specified parameter
293 unsigned int GetParamAsUInt(const char* param) const;
296 * @brief Returns a vector of unsigned int values for the given parameter or returns the default value
298 * @param param Name of the layer parameter
299 * @param def Default value of the parameter if not found
300 * @return vector of unsigned int values
302 std::vector<unsigned int> GetParamAsUInts(const char* param, std::vector<unsigned int> def) const;
305 * @brief Returns a vector of unsigned int values for the given parameter
307 * @param param Name of the layer parameter
308 * @return vector of unsigned int values
310 std::vector<unsigned int> GetParamAsUInts(const char* param) const;
313 * @brief Returns a boolean value for the given parameter.
315 * The valid values are (true, false, 1, 0).
316 * @param param Name of the layer parameter
317 * @param def Default value of the parameter if not found
318 * @return A bool value for the specified parameter
320 bool GetParamAsBool(const char* param, bool def) const;
323 * @brief Returns a boolean value for the given parameter
325 * @param param Name of the layer parameter
326 * @return A bool value for the specified parameter
328 bool GetParamAsBool(const char* param) const;
331 * @brief Returns a string value for the given parameter or returns the default one
333 * @param param Name of the layer parameter
334 * @param def Default value of the parameter if not found
335 * @return A string value
337 std::string GetParamAsString(const char* param, const char* def) const;
340 * @brief Checks the param presence in the layer
342 * @param param Name of the layer parameter
343 * @return a bool depending param presence
345 bool CheckParamPresence(const char* param) const;
348 * @brief Returns a string value for the given parameter.
350 * Throws exception if parameter was not found.
351 * @param param Name of the layer parameter
352 * @return A string value
354 std::string GetParamAsString(const char* param) const;
357 * @brief Gets the parameter as a std::vector<std::string>
358 * @param param The parameter name
359 * @param def The default values if case of parameter is not found
360 * @return The parameter as strings.
362 std::vector<std::string> GetParamAsStrings(const char* param, std::vector<std::string> def) const;
365 * @brief Map of pairs: (parameter name, parameter value)
367 std::map<std::string, std::string> params;
370 * @brief Map of pairs: (name, weights/biases blob)
372 std::map<std::string, Blob::Ptr> blobs;
376 * @brief Alias for CNNLayer object
378 IE_SUPPRESS_DEPRECATED_START
379 using GenericLayer = class CNNLayer;
380 IE_SUPPRESS_DEPRECATED_END
382 IE_SUPPRESS_DEPRECATED_START_WIN
385 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
386 * @brief This class represents a layer with Weights and/or Biases (e.g. Convolution/Fully Connected, etc.)
388 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(WeightableLayer): public CNNLayer {
390 IE_SUPPRESS_DEPRECATED_START
393 * @brief A default constructor. Constructs a WeightableLayer instance and initiates layer parameters with the given
396 * @param prms Initial layer parameters
398 explicit WeightableLayer(const LayerParams & prms);
400 IE_SUPPRESS_DEPRECATED_END
403 * @brief A pointer to a weights blob
407 * @brief A pointer to a biases blob
412 * @brief Constructs a WeightableLayer instance and initiates layer parameters with the given values
414 using CNNLayer::CNNLayer;
416 ~WeightableLayer() override;
420 * @brief convinenent way to declare property with backward compatibility to 2D members
422 #define DEFINE_PROP(prop_name) \
423 PropertyVector<unsigned int> prop_name; \
424 unsigned int& prop_name##_x = prop_name.at(X_AXIS); \
425 unsigned int& prop_name##_y = prop_name.at(Y_AXIS)
428 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
429 * @brief This class represents a standard 3D Convolution Layer
431 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(ConvolutionLayer): public WeightableLayer {
434 * @brief A convolution kernel array [X, Y, Z, ...]
436 DEFINE_PROP(_kernel);
438 * @brief A convolution paddings begin array [X, Y, Z, ...]
440 DEFINE_PROP(_padding);
442 * @brief A convolution paddings end array [X, Y, Z, ...]
444 PropertyVector<unsigned int> _pads_end;
446 * @brief A convolution strides array [X, Y, Z, ...]
448 DEFINE_PROP(_stride);
450 * @brief A convolution dilations array [X, Y, Z, ...]
452 DEFINE_PROP(_dilation);
454 * @brief A number of output feature maps (size) generating the 3'rd output dimension
456 unsigned int _out_depth = 0u;
458 * @brief Number of groups
460 unsigned int _group = 1u;
462 * @brief Auto padding type
464 std::string _auto_pad;
466 IE_SUPPRESS_DEPRECATED_START
469 * @brief Creates a new ConvolutionLayer instance.
471 explicit ConvolutionLayer(const LayerParams& p)
472 : WeightableLayer(p), _kernel(2, 0u), _padding(2, 0u), _stride(2, 1u), _dilation(2, 1u) {}
475 * @brief assignment operator
477 ConvolutionLayer& operator=(const ConvolutionLayer& that) {
479 WeightableLayer::operator=(that);
480 _kernel = that._kernel;
481 _padding = that._padding;
482 _pads_end = that._pads_end;
483 _stride = that._stride;
484 _dilation = that._dilation;
485 _out_depth = that._out_depth;
486 _group = that._group;
492 * @brief copy constructor
494 ConvolutionLayer(const ConvolutionLayer& that): WeightableLayer(that) {
498 * @brief move constructor
500 ConvolutionLayer(ConvolutionLayer&&) = default;
502 IE_SUPPRESS_DEPRECATED_END
504 ~ConvolutionLayer() override;
508 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
509 * @brief This class represents a standard deconvolution layer
511 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(DeconvolutionLayer): public ConvolutionLayer {
513 using ConvolutionLayer::ConvolutionLayer;
514 using ConvolutionLayer::operator=;
516 ~DeconvolutionLayer() override;
520 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
521 * @brief This class represents a standard deformable convolution layer
523 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(DeformableConvolutionLayer): public ConvolutionLayer {
525 using ConvolutionLayer::ConvolutionLayer;
526 using ConvolutionLayer::operator=;
529 * @brief Number of deformable groups
531 unsigned int _deformable_group = 1u;
533 ~DeformableConvolutionLayer() override;
537 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
538 * @brief This class represents a standard pooling layer
540 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(PoolingLayer): public CNNLayer {
543 * @brief Pooling kernel array [X, Y, Z, ...]
545 DEFINE_PROP(_kernel);
547 * @brief Pooling paddings begin array [X, Y, Z, ...]
549 DEFINE_PROP(_padding);
551 * @brief Pooling paddings end array [X, Y, Z, ...]
553 PropertyVector<unsigned int> _pads_end;
555 * @brief Pooling strides array [X, Y, Z, ...]
557 DEFINE_PROP(_stride);
561 * @brief Defines available pooling types
563 enum PoolType { MAX = 1, AVG = 2, STOCH = 3, ROI = 4, SPACIAL_PYRAMID = 5 };
566 * @brief A pooling type
568 PoolType _type = MAX;
571 * @brief A flag that indicates if padding is excluded or not
573 bool _exclude_pad = false;
575 * @brief Auto padding type
577 std::string _auto_pad;
579 IE_SUPPRESS_DEPRECATED_START
582 * @brief Creates a new PoolingLayer instance.
584 explicit PoolingLayer(const LayerParams& p): CNNLayer(p), _kernel(2, 0u), _padding(2, 0u), _stride(2, 0u) {}
587 * @brief assignment operator
589 PoolingLayer& operator=(const PoolingLayer& that) {
591 CNNLayer::operator=(that);
592 _kernel = that._kernel;
593 _padding = that._padding;
594 _pads_end = that._pads_end;
595 _stride = that._stride;
597 _exclude_pad = that._exclude_pad;
602 * @brief copy constructor
604 PoolingLayer(const PoolingLayer& that): CNNLayer(that) {
609 * @brief move constructor
611 PoolingLayer(PoolingLayer&&) = default;
613 IE_SUPPRESS_DEPRECATED_END
615 ~PoolingLayer() override;
619 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
620 * @brief This class represents a standard binary convolution layer
622 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(BinaryConvolutionLayer): public WeightableLayer {
625 * @enum eBinaryConvolutionMode
626 * @brief Defines possible modes of binary convolution operation
628 enum eBinaryConvolutionMode { xnor_popcount = 0 };
631 * @brief Mode of binary convolution operation
633 eBinaryConvolutionMode _mode = xnor_popcount;
636 * @brief A number of input feature maps (size) generating the 3'rd input dimension
638 unsigned int _in_depth = 0u;
641 * @brief A pad value which is used to fill pad area
643 float _pad_value = 0.0f;
646 * @brief A convolution kernel array [X, Y, Z, ...]
648 DEFINE_PROP(_kernel);
650 * @brief A convolution paddings begin array [X, Y, Z, ...]
652 DEFINE_PROP(_padding);
654 * @brief A convolution paddings end array [X, Y, Z, ...]
656 PropertyVector<unsigned int> _pads_end;
658 * @brief A convolution strides array [X, Y, Z, ...]
660 DEFINE_PROP(_stride);
662 * @brief A convolution dilations array [X, Y, Z, ...]
664 DEFINE_PROP(_dilation);
666 * @brief A number of output feature maps (size) generating the 3'rd output dimension
668 unsigned int _out_depth = 0u;
670 * @brief Number of groups
672 unsigned int _group = 1u;
674 * @brief Auto padding type
676 std::string _auto_pad;
678 IE_SUPPRESS_DEPRECATED_START
681 * @brief Creates a new BinaryConvolutionLayer instance.
683 explicit BinaryConvolutionLayer(const LayerParams& p)
684 : WeightableLayer(p), _kernel(2, 0u), _padding(2, 0u), _stride(2, 1u), _dilation(2, 1u) {}
687 * @brief assignment operator
689 BinaryConvolutionLayer& operator=(const BinaryConvolutionLayer& that) {
691 WeightableLayer::operator=(that);
692 _kernel = that._kernel;
693 _padding = that._padding;
694 _pads_end = that._pads_end;
695 _stride = that._stride;
696 _dilation = that._dilation;
697 _out_depth = that._out_depth;
698 _group = that._group;
700 _in_depth = that._in_depth;
701 _pad_value = that._pad_value;
706 * @brief copy constructor
708 BinaryConvolutionLayer(const BinaryConvolutionLayer& that): WeightableLayer(that) {
712 * @brief move constructor
714 BinaryConvolutionLayer(BinaryConvolutionLayer&&) = default;
716 IE_SUPPRESS_DEPRECATED_END
718 ~BinaryConvolutionLayer() override;
724 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
725 * @brief This class represents a fully connected layer
727 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(FullyConnectedLayer): public WeightableLayer {
730 * @brief A size of output
732 unsigned int _out_num = 0;
735 * @brief Creates a new FullyConnectedLayer instance and initializes layer parameters with the given values.
737 using WeightableLayer::WeightableLayer;
739 ~FullyConnectedLayer() override;
743 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
744 * @brief This class represents concatenation layer
746 * Takes as input several data elements and merges them to one using the supplied axis
748 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(ConcatLayer): public CNNLayer {
751 * @brief An axis on which concatenation operation is performed
753 unsigned int _axis = 1;
756 * @brief Creates a new ConcatLayer instance and initializes layer parameters with the given values.
758 * If batch is used, then batch needs to be specified as an input dimension also
759 * In current implementation 1 means channels, 0 - batch
761 using CNNLayer::CNNLayer;
763 ~ConcatLayer() override;
767 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
768 * @brief This class represents a layer that evenly splits the input into the supplied outputs
770 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(SplitLayer): public CNNLayer {
773 * @brief An axis on which split operation is performed
775 unsigned int _axis = 1;
778 * @brief Creates a new SplitLayer instance.
780 using CNNLayer::CNNLayer;
782 ~SplitLayer() override;
786 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
787 * @brief This class represents a Linear Response Normalization (LRN) Layer
789 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(NormLayer): public CNNLayer {
792 * @brief Response size
794 unsigned int _size = 0;
800 * @brief Alpha coefficient
804 * @brief Beta coefficient
808 * @brief Flag to specify normalization across feature maps (true) or across channels
810 bool _isAcrossMaps = false;
813 * @brief Creates a new NormLayer instance.
815 using CNNLayer::CNNLayer;
817 ~NormLayer() override;
821 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
822 * @brief This class represents standard softmax Layer
824 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(SoftMaxLayer): public CNNLayer {
827 * @brief Axis number for a softmax operation
831 * @brief Creates a new SoftMaxLayer instance.
833 using CNNLayer::CNNLayer;
835 ~SoftMaxLayer() override;
839 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
840 * @brief This class represents standard GRN Layer
842 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(GRNLayer): public CNNLayer {
845 * @brief A default constructor. Creates a new GRNLayer instance and initializes layer parameters with the given
848 using CNNLayer::CNNLayer;
851 * @brief Bias for squares sum
855 ~GRNLayer() override;
859 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
860 * @brief This class represents standard MVN Layer
862 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(MVNLayer): public CNNLayer {
865 * @brief A default constructor. Creates a new MVNLayer instance and initializes layer parameters with the given
868 using CNNLayer::CNNLayer;
871 * @brief Indicate that mean value is calculated across channels
873 int across_channels = 0;
876 * @brief Indicate that the result needs to be normalized
880 ~MVNLayer() override;
884 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
885 * @brief This class represents a Rectified Linear activation layer
887 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(ReLULayer): public CNNLayer {
890 * @brief Negative slope is used to takle negative inputs instead of setting them to 0
892 float negative_slope = 0.0f;
895 * @brief Creates a new ReLULayer instance.
897 using CNNLayer::CNNLayer;
899 ~ReLULayer() override;
903 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
904 * @brief This class represents a Clamp activation layer
906 * Clamps all tensor elements into the range [min_value, max_value]
908 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(ClampLayer): public CNNLayer {
911 * @brief A minimum value
913 float min_value = 0.0f;
916 * @brief A maximum value
918 float max_value = 1.0f;
920 * @brief Creates a new ClampLayer instance.
922 using CNNLayer::CNNLayer;
924 ~ClampLayer() override;
928 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
929 * @brief This class represents a ReLU6 activation layer
931 * Clamps all tensor elements into the range [0, 6.0]
933 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(ReLU6Layer): public ClampLayer {
935 IE_SUPPRESS_DEPRECATED_START
937 * @brief A constructor with common layer parameters
938 * @param prms The common layer parameters
940 explicit ReLU6Layer(const LayerParams& prms): ClampLayer(prms) {
943 IE_SUPPRESS_DEPRECATED_END
945 ~ReLU6Layer() override;
949 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
950 * @brief This class represents an element wise operation layer
952 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(EltwiseLayer): public CNNLayer {
956 * @brief Defines possible operations that can be used
982 * @brief A type of the operation to use
984 eOperation _operation = Sum;
987 * @brief A vector of coefficients to scale the operands
989 std::vector<float> coeff;
992 * @brief Creates a new EltwiseLayer instance.
994 using CNNLayer::CNNLayer;
996 ~EltwiseLayer() override;
1000 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1001 * @brief This class represents a standard crop layer
1003 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(CropLayer): public CNNLayer {
1006 * @brief A vector of dimensions for cropping
1008 std::vector<int> axis;
1010 * @brief A vector of dimensions to be preserved
1012 std::vector<int> dim;
1014 * @brief A vector of offsets for each dimension
1016 std::vector<int> offset;
1019 * @brief Creates a new CropLayer instance.
1021 using CNNLayer::CNNLayer;
1023 ~CropLayer() override;
1027 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1028 * @brief This class represents a standard reshape layer
1030 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(ReshapeLayer): public CNNLayer {
1033 * @brief A vector of sizes of the shape
1035 std::vector<int> shape;
1037 * @brief A number of axis to be taken for a reshape
1041 * @brief A number of first axises to be taken for a reshape
1046 * @brief Creates a new ReshapeLayer instance.
1048 using CNNLayer::CNNLayer;
1050 ~ReshapeLayer() override;
1054 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1055 * @brief This class represents a standard Tile Layer
1057 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(TileLayer): public CNNLayer {
1060 * @brief An index of the axis to tile
1064 * @brief A number of copies to be made
1069 * @brief Creates a new TileLayer instance.
1071 using CNNLayer::CNNLayer;
1073 ~TileLayer() override;
1077 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1078 * @brief This class represents a Layer which performs Scale and Shift
1080 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(ScaleShiftLayer): public WeightableLayer {
1083 * @brief A flag that indicates if the same value is used for all the features. If false, the value is used pixel
1086 unsigned int _broadcast = 0;
1089 * @brief Creates a new ScaleShiftLayer instance.
1091 using WeightableLayer::WeightableLayer;
1093 ~ScaleShiftLayer() override;
1097 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1098 * @brief This class represents TensorIterator layer
1100 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(TensorIterator): public CNNLayer {
1104 int from; /**< Index of exteral data from ins/outs fields of CNNLayer */
1105 int to; /**< Index of internal data in iterator body */
1108 int axis; /**< Axis to iterate throught */
1109 int stride; /**< Stride to iterate throught */
1110 int start; /**< Start index of iteration range */
1111 int end; /**< Last index of iteration range */
1112 int part_size; /**< Part size which will be transfered to body subnetwork */
1116 * @brief Describes a tensor iterator body
1119 std::vector<DataPtr> inputs; //!< Inputs data
1120 std::vector<DataPtr> outputs; //!< Outputs data
1123 std::vector<PortMap> input_port_map; //!< Input ports map
1124 std::vector<PortMap> output_port_map; //!< Output ports map
1125 std::vector<PortMap> back_edges; //!< Back edges map
1127 Body body; //!< A Tensor Iterator body
1129 using CNNLayer::CNNLayer;
1131 ~TensorIterator() override;
1135 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1136 * @brief Base class for recurrent cell layers
1138 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(RNNCellBase): public WeightableLayer {
1140 using WeightableLayer::WeightableLayer;
1143 * @brief Direct type of recurrent cell (including subtypes)
1144 * Description of particular cell semantics is in LSTMCell, GRUCell, RNNCell.
1147 LSTM, /**< Original LSTM cell */
1148 GRU, /**< Original GRU cell */
1149 RNN, /**< Original RNN cell */
1150 GRU_LBR, /**< GRU cell modification. "Linear before reset" */
1153 /** @copybrief CellType */
1154 CellType cellType = LSTM;
1157 * @brief Size of hidden state data
1159 * In case of batch output state tensor will have shape [N, hidden_size]
1161 int hidden_size = 0;
1164 * @brief Clip data into range [-clip, clip] on input of activations
1166 * clip==0.0f means no clipping
1170 * @brief Activations used inside recurrent cell
1172 * Valid values: sigmoid, tanh, relu
1174 std::vector<std::string> activations;
1177 * @brief Alpha parameters of activations
1179 * Respective to activation list.
1181 std::vector<float> activation_alpha;
1184 * @brief Beta parameters of activations
1186 * Respective to activation list.
1188 std::vector<float> activation_beta;
1190 ~RNNCellBase() override;
1194 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1195 * @brief LSTM Cell layer
1197 * G - number of gates (=4)
1199 * S - state size (=hidden_size)
1202 * [N,D] Xt - input data
1203 * [N,S] Ht-1 - initial hidden state
1204 * [N,S] Ct-1 - initial cell state
1207 * [N,S] Ht - out hidden state
1208 * [N,S] Ct - out cell state
1211 * - weights [G,S,D+S]
1213 * NB! gates order is FICO {forget, input, candidate, output}
1215 * activations is {_f, _g, _h}
1216 * default: {_f=sigm, _g=tanh, _h=tanh}
1221 * (.) - eltwise mult
1222 * [,] - concatenation
1224 * - ft = _f(Wf*[Ht-1, Xt] + Bf)
1225 * - it = _f(Wi*[Ht-1, Xt] + Bi)
1226 * - ct = _g(Wc*[Ht-1, Xt] + Bc)
1227 * - ot = _f(Wo*[Ht-1, Xt] + Bo)
1228 * - Ct = ft (.) Ct-1 + it (.) ct
1229 * - Ht = ot (.) _h(Ct)
1231 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(LSTMCell): public RNNCellBase {
1233 using RNNCellBase::RNNCellBase;
1234 using RNNCellBase::operator=;
1236 ~LSTMCell() override;
1240 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1241 * @brief GRU Cell layer
1243 * G - number of gates (=3)
1245 * S - state size (=hidden_size)
1248 * [N,D] Xt - input data
1249 * [N,S] Ht-1 - initial hidden state
1252 * [N,S] Ht - out hidden state
1255 * - weights [G,S,D+S]
1257 * NB! gates order is ZRH {update, reset, output}
1259 * activations is {_f, _g}
1260 * default: {_f=sigm, _g=tanh}
1265 * (.) - eltwise mult
1266 * [,] - concatenation
1268 * - zt = _f(Wz*[Ht-1, Xt] + Bz)
1269 * - rt = _f(Wr*[Ht-1, Xt] + Br)
1270 * - ht = _g(Wh*[rt (.) Ht-1, Xt] + Bh)
1271 * - Ht = (1 - zt) (.) ht + zt (.) Ht-1
1273 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(GRUCell): public RNNCellBase {
1275 using RNNCellBase::RNNCellBase;
1276 using RNNCellBase::operator=;
1278 ~GRUCell() override;
1282 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1283 * @brief RNN Cell layer
1285 * G - number of gates (=1)
1287 * S - state size (=hidden_size)
1290 * [N,D] Xt - input data
1291 * [N,S] Ht-1 - initial hidden state
1294 * [N,S] Ht - out hidden state
1297 * - weights [G,S,D+S]
1300 * activations is {_f}
1301 * default: {_f=tanh}
1306 * [,] - concatenation
1308 * - Ht = _f(Wi*[Ht-1, Xt] + Bi)
1310 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(RNNCell): public RNNCellBase {
1312 using RNNCellBase::RNNCellBase;
1313 using RNNCellBase::operator=;
1315 ~RNNCell() override;
1319 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1320 * @brief Sequence of recurrent cells
1324 * S - state size (=hidden_size)
1325 * NS - num of state tensors (LSTM=2, GRU/RNN=1)
1326 * ND - num of direction (BDR=2, WFD/BWD=1)
1329 * [N,T,D] Xt - input data
1330 * [ND,N,S] Ht-1 - initial hidden state
1331 * [ND,N,S] Ct-1 - initial cell state // if NS==2
1332 * [N] SL - sequence length (optional input)
1335 * [ND,N,T,S] Xt - input data
1336 * [ND,N,S] Ht-1 - initial hidden state
1337 * [ND,N,S] Ct-1 - initial cell state // if NS==2
1339 * NB! if axis==0 batch and sequense dimensions are swapped (N <-> T) for input and output tensors
1342 * - weights [ND,G,S,D+S]
1344 * NB! if ND==2 weights are concatenated cell weights [forward_cell_weights, backward_cell_weights]
1347 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(RNNSequenceLayer): public RNNCellBase {
1349 using RNNCellBase::RNNCellBase;
1352 * @brief An axis by which iteration is performed
1354 * axis=0 means first input/output data blob dimension is sequence
1355 * axis=1 means first input/output data blob dimension is batch
1357 unsigned int axis = 1;
1360 * @brief Direction of iteration through sequence dimension
1363 FWD, /**< Forward mode. Iterate starts from index 0 with step 1. */
1364 BWD, /**< Backward mode. Iterate starts from last index with step -1. */
1365 BDR /**< Bidirectional mode. First is forward pass, second is backward. */
1368 /** @copybrief Direction */
1369 Direction direction = FWD;
1371 ~RNNSequenceLayer() override;
1375 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1376 * @brief This class represents a Layer which performs Scale and Shift
1378 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(PReLULayer): public WeightableLayer {
1381 * @brief A flag that indicates if the same negative_slope value is used for all the features. If false, the value
1382 * is used pixel wise
1384 bool _channel_shared = false;
1387 * @brief A default constructor. Creates a new PReLULayer instance and initializes layer parameters with the given
1390 * @param prms Initial layer parameters
1392 using WeightableLayer::WeightableLayer;
1394 ~PReLULayer() override;
1398 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1399 * @brief This class represents a standard Power Layer
1401 * Formula is: output = (offset + scale * input) ^ power
1403 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(PowerLayer): public CNNLayer {
1406 * @brief An exponent value
1410 * @brief A scale factor
1414 * @brief An offset value
1419 * @brief Creates a new PowerLayer instance.
1421 using CNNLayer::CNNLayer;
1423 ~PowerLayer() override;
1427 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1428 * @brief This class represents a Batch Normalization Layer
1430 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(BatchNormalizationLayer): public WeightableLayer {
1433 * @brief A small value to add to the variance estimate to avoid division by zero
1435 float epsilon = 1e-3f;
1438 * @brief Creates a new BatchNormalizationLayer instance.
1440 using WeightableLayer::WeightableLayer;
1442 ~BatchNormalizationLayer() override;
1446 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1447 * @brief This class represents a general matrix multiplication operation layer
1449 * Formula is: dst := alpha*src1*src2 + beta*src3
1451 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(GemmLayer): public CNNLayer {
1454 * @brief A scale factor of src1 matrix
1458 * @brief A scale factor of src3 matrix
1462 * @brief A flag that indicates if the src1 matrix is to be transposed
1464 bool transpose_a = false;
1466 * @brief A flag that indicates if the src2 matrix is to be transposed
1468 bool transpose_b = false;
1470 * @brief Creates a new GemmLayer instance.
1472 using CNNLayer::CNNLayer;
1474 ~GemmLayer() override;
1478 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1479 * @brief This class represents a standard Pad layer
1481 * Adds paddings to input tensor
1483 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(PadLayer): public CNNLayer {
1487 * @brief Defines possible modes of pad operation
1489 enum ePadMode { Constant = 0, Edge, Reflect, Symmetric };
1492 * @brief Size of padding in the beginning of each axis
1494 PropertyVector<unsigned int> pads_begin;
1496 * @brief Size of padding in the end of each axis
1498 PropertyVector<unsigned int> pads_end;
1500 * @brief Mode of pad operation
1502 ePadMode pad_mode = Constant;
1504 * @brief A pad value which is used for filling in Constant mode
1506 float pad_value = 0.0f;
1508 * @brief Creates a new PadLayer instance.
1510 using CNNLayer::CNNLayer;
1512 ~PadLayer() override;
1516 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1517 * @brief This class represents a standard Gather layer
1519 * Gather slices from Dictionary according to Indexes
1521 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(GatherLayer): public CNNLayer {
1524 * @brief The axis in Dictionary to gather Indexes from
1528 * @brief Creates a new GatherLayer instance.
1530 using CNNLayer::CNNLayer;
1532 ~GatherLayer() override;
1536 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1537 * @brief This class represents a standard Strided Slice layer
1539 * Strided Slice picks from input tensor according parameters
1541 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(StridedSliceLayer): public CNNLayer {
1544 * @brief The begin_mask is a bitmask where bit i being 0 means
1545 * to ignore the begin value and instead use the default value
1547 std::string begin_mask;
1549 * @brief Analogous to begin_mask
1551 std::string end_mask;
1553 * @brief The ellipsis_mask is a bitmask where bit i being 1 means
1554 * the i-th is actually an ellipsis
1556 std::string ellipsis_mask;
1558 * @brief The new_axis_mask_ is a bitmask where bit i being 1 means
1559 * the i-th position creates a new 1 dimension shape
1561 std::string new_axis_mask;
1563 * @brief The shrink_axis_mask is a bitmask where bit i being 1 means
1564 * the i-th position shrinks the dimensionality
1566 std::string shrink_axis_mask;
1569 * @brief Creates a new StridedSliceLayer instance.
1571 using CNNLayer::CNNLayer;
1573 ~StridedSliceLayer() override;
1577 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1578 * @brief This class represents a standard Shuffle Channels layer
1579 * Shuffle Channels picks from input tensor according parameters
1581 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(ShuffleChannelsLayer): public CNNLayer {
1584 * @brief The axis in tensor to shuffle channels
1589 * @brief The group of output shuffled channels
1591 unsigned int group = 1;
1594 * @brief Creates a new ShuffleChannelsLayer instance.
1596 using CNNLayer::CNNLayer;
1598 ~ShuffleChannelsLayer() override;
1602 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1603 * @brief This class represents a standard Depth To Space layer
1604 * Depth To Space picks from input tensor according parameters
1606 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(DepthToSpaceLayer): public CNNLayer {
1609 * @brief The group of output shuffled channels
1611 unsigned int block_size = 1;
1614 * @brief Creates a new DepthToSpaceLayer instance.
1616 using CNNLayer::CNNLayer;
1618 ~DepthToSpaceLayer() override;
1622 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1623 * @brief This class represents a standard Space To Depth layer
1624 * Space To Depth picks from input tensor according parameters
1626 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(SpaceToDepthLayer): public CNNLayer {
1629 * @brief The group of output Space To Depth
1631 unsigned int block_size = 1;
1634 * @brief Creates a new SpaceToDepthLayer instance.
1636 using CNNLayer::CNNLayer;
1638 ~SpaceToDepthLayer() override;
1642 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1643 * @brief This class represents a standard Space To Batch layer
1645 * Space To Batch picks from input tensor according parameters
1647 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(SpaceToBatchLayer): public CNNLayer {
1650 * @brief Spatial dimensions blocks sizes
1652 std::vector<size_t> _block_shape;
1655 * @brief Size of padding in the beginning of each axis
1657 std::vector<size_t> _pads_begin;
1659 * @brief Size of padding in the end of each axis
1661 std::vector<size_t> _pads_end;
1664 * @brief Creates a new SpaceToBatchLayer instance.
1666 using CNNLayer::CNNLayer;
1668 ~SpaceToBatchLayer() override;
1672 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1673 * @brief This class represents a standard Batch To Space layer
1675 * Batch To Space picks from input tensor according parameters
1677 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(BatchToSpaceLayer): public CNNLayer {
1680 * @brief Spatial dimensions blocks sizes
1682 std::vector<size_t> _block_shape;
1685 * @brief It specifies how many elements to crop from the intermediate result
1686 * across the spatial dimensions
1688 std::vector<size_t> _crops_begin;
1691 * @brief It specifies how many elements to crop from the intermediate result
1692 * across the spatial dimensions
1694 std::vector<size_t> _crops_end;
1697 * @brief Creates a new BatchToSpaceLayer instance.
1699 using CNNLayer::CNNLayer;
1701 ~BatchToSpaceLayer() override;
1705 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1706 * @brief This class represents SparseFillEmptyRows layer
1708 * SparseFillEmptyRows fills empty rows in a sparse tensor
1710 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(SparseFillEmptyRowsLayer): public CNNLayer {
1713 * @brief Creates a new SparseFillEmptyRowsLayer instance.
1715 using CNNLayer::CNNLayer;
1717 ~SparseFillEmptyRowsLayer() override;
1721 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1722 * @brief This class represents SparseSegmentMean(SqrtN, Sum) layers
1723 * SparseSegmentMean(SqrtN, Sum) layer reduces data along sparse segments of a tensor.
1725 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(SparseSegmentReduceLayer): public CNNLayer {
1728 * @brief Creates a new SparseSegmentReduceLayer instance.
1730 using CNNLayer::CNNLayer;
1732 ~SparseSegmentReduceLayer() override;
1736 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1737 * @brief This class represents ExperimentalSparseWeightedReduce layer
1738 * ExperimentalSparseWeightedReduce layer reduces data along sparse segments of a tensor.
1740 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(ExperimentalSparseWeightedReduceLayer) : public CNNLayer {
1743 * @brief Creates a new ExperimentalSparseWeightedReduceLayer instance.
1745 using CNNLayer::CNNLayer;
1747 ~ExperimentalSparseWeightedReduceLayer() override;
1751 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1752 * @brief This class represents SparseToDense layer
1753 * SparseToDense layer converts a sparse tensor to a dense tensor.
1755 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(SparseToDenseLayer) : public CNNLayer {
1758 * @brief Creates a new SparseToDenseLayer instance.
1760 using CNNLayer::CNNLayer;
1762 ~SparseToDenseLayer() override;
1766 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1767 * @brief This class represents Bucketize layer
1768 * Bucketize layer bucketizes the input based on the boundaries.
1770 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(BucketizeLayer) : public CNNLayer {
1773 * @brief Indicates whether the intervals include the right or the left bucket edge.
1775 bool with_right_bound = true;
1778 * @brief Creates a new BucketizeLayer instance.
1780 using CNNLayer::CNNLayer;
1782 ~BucketizeLayer() override;
1786 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1787 * @brief This class represents a standard Reverse Sequence layer
1789 * Reverse Sequence modifies input tensor according parameters
1791 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(ReverseSequenceLayer): public CNNLayer {
1794 * @brief The seq_axis dimension in tensor which is partially reversed
1799 * @brief The batch_axis dimension in tensor along which reversal is performed
1804 * @brief Creates a new ReverseSequence instance.
1806 using CNNLayer::CNNLayer;
1808 ~ReverseSequenceLayer() override;
1812 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1813 * @brief This class represents a OneHot layer
1814 * Converts input into OneHot representation.
1816 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(OneHotLayer): public CNNLayer {
1819 * @brief A depth of representation
1821 unsigned int depth = 0;
1824 * @brief The locations represented by indices in input take value on_value
1826 float on_value = 1.f;
1829 * @brief The locations not represented by indices in input take value off_value
1831 float off_value = 0.f;
1834 * @brief Define the shape of output tensor
1839 * @brief Creates a new OneHot instance
1841 using CNNLayer::CNNLayer;
1843 ~OneHotLayer() override;
1847 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1848 * @brief This class represents a standard RangeLayer layer
1850 * RangeLayer modifies input tensor dimensions according parameters
1852 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(RangeLayer): public CNNLayer {
1855 * @brief Creates a new RangeLayer instance.
1857 using CNNLayer::CNNLayer;
1859 ~RangeLayer() override;
1863 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1864 * @brief This class represents a standard Fill layer
1866 * RFill modifies input tensor according parameters
1868 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(FillLayer): public CNNLayer {
1871 * @brief Creates a new Fill instance.
1873 using CNNLayer::CNNLayer;
1875 ~FillLayer() override;
1879 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1880 * @brief This class represents a SelectLayer layer
1882 * SelectLayer layer takes elements from the second (“then”) or the third (“else”) input based on condition mask
1883 * (“cond”) provided in the first input. The “cond” tensor is broadcasted to “then” and “else” tensors. The output
1884 * tensor shape is equal to broadcasted shape of “cond”, “then” and “else”.
1886 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(SelectLayer): public CNNLayer {
1889 * @brief Creates a new SelectLayer instance.
1891 using CNNLayer::CNNLayer;
1893 ~SelectLayer() override;
1897 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1898 * @brief This class represents a standard Broadcast layer
1900 * Broadcast modifies input tensor dimensions according parameters
1902 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(BroadcastLayer): public CNNLayer {
1905 * @brief Creates a new Broadcast instance.
1907 using CNNLayer::CNNLayer;
1909 ~BroadcastLayer() override;
1913 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1914 * @brief This class represents a quantization operation layer
1916 * Element-wise linear quantization of floating point input values into a descrete set of floating point values
1918 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(QuantizeLayer): public CNNLayer {
1921 * @brief The number of quantization levels
1926 * @brief Creates a new QuantizeLayer instance.
1928 using CNNLayer::CNNLayer;
1930 ~QuantizeLayer() override;
1934 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1935 * @brief This class represents a standard Math layers
1937 * Math modifies input tensor dimensions according parameters
1939 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(MathLayer): public CNNLayer {
1942 * @brief Creates a new Math instance.
1944 using CNNLayer::CNNLayer;
1946 ~MathLayer() override;
1950 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1951 * @brief This class represents a standard Reduce layers
1953 * Reduce modifies input tensor according parameters
1955 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(ReduceLayer): public CNNLayer {
1958 * @brief The keep_dims dimension in tensor which is partially reversed
1960 bool keep_dims = true;
1963 * @brief Creates a new Reduce instance.
1965 using CNNLayer::CNNLayer;
1967 ~ReduceLayer() override;
1971 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
1972 * @brief This class represents a standard TopK layer
1974 * TopK picks top K values from input tensor according parameters
1976 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(TopKLayer): public CNNLayer {
1979 * @brief The mode could be 'max' or 'min'
1983 * @brief top K values sort mode could be 'value' or 'index'
1987 * @brief The axis dimension in tensor which is top K values are picked
1992 * @brief Creates a new TopKLayer instance.
1994 using CNNLayer::CNNLayer;
1996 ~TopKLayer() override;
2000 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
2001 * @brief This class represents Unique layer.
2003 * The Unique operation searches for unique elements in 1-D input
2005 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(UniqueLayer): public CNNLayer {
2008 * @brief A flag indicating whether to sort unique elements
2012 * @brief A flag indicating whether to return indices of input data elements in the output of uniques
2014 bool return_inverse;
2016 * @brief A flag indicating whether to return a number of occurences for each unique element
2021 * @brief Creates a new UniqueLayer instance.
2023 using CNNLayer::CNNLayer;
2025 ~UniqueLayer() override;
2029 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
2030 * @brief This class represents a standard NonMaxSuppression layer
2032 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(NonMaxSuppressionLayer): public CNNLayer {
2035 * @brief The 'center_point_box' indicates the format of the box data
2037 bool center_point_box = false;
2039 * @brief The 'sort_result_descending' indicates that result will sort descending by score through all batches and
2042 bool sort_result_descending = true;
2044 * @brief Creates a new NonMaxSuppressionLayer instance.
2046 using CNNLayer::CNNLayer;
2048 ~NonMaxSuppressionLayer() override;
2052 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
2053 * @brief This class represents a standard ScatterUpdate layer
2055 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(ScatterUpdateLayer): public CNNLayer {
2058 * @brief Creates a new ScatterUpdateLayer instance.
2060 using CNNLayer::CNNLayer;
2062 ~ScatterUpdateLayer() override;
2066 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
2067 * @brief This class represents a standard ScatterElementsUpdate layer
2069 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(ScatterElementsUpdateLayer): public CNNLayer {
2072 * @brief Creates a new ScatterElementsUpdateLayer instance.
2074 using CNNLayer::CNNLayer;
2076 ~ScatterElementsUpdateLayer() override;
2080 * @deprecated Migrate to IR v10 and work with ngraph::Function directly. The method will be removed in 2021.1
2081 * @brief This class represents an onnx ExperimentalDetectronPriorGridGenerator Layer
2083 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(ExperimentalDetectronPriorGridGeneratorLayer): public CNNLayer {
2086 * @brief flatten value
2090 * @brief Value of grid width
2094 * @brief Value of grid height
2098 * @brief Value of width step between grid cells
2100 float stride_w = 0.f;
2102 * @brief Value of height step between grid cells
2104 float stride_h = 0.f;
2107 * @brief Creates a new ExperimentalDetectronPriorGridGenerator instance.
2109 using CNNLayer::CNNLayer;
2111 virtual ~ExperimentalDetectronPriorGridGeneratorLayer();
2115 * @brief This class represents a standard ExperimentalDetectronTopKROIs layer
2117 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(ExperimentalDetectronTopKROIs): public CNNLayer {
2120 * @brief The maximum number of output rois
2124 * @brief Creates a new ExperimentalDetectronTopKROIs instance.
2126 using CNNLayer::CNNLayer;
2128 virtual ~ExperimentalDetectronTopKROIs();
2132 * @brief This class represents an onnx ExperimentalDetectronGenerateProposalsSingleImage Layer
2134 class INFERENCE_ENGINE_INTERNAL_CNNLAYER_CLASS(ExperimentalDetectronGenerateProposalsSingleImageLayer): public CNNLayer {
2137 * @brief Minimium width and height for boxes
2139 float min_size = 0.f;
2141 * @brief Non max suppression threshold
2143 float nms_threshold = 0.7f;
2145 * @brief Maximum number of anchors selected before nms
2147 int pre_nms_topn = 1000;
2149 * @brief Maximum number of anchors selected after nms
2151 int post_nms_topn = 1000;
2154 * @brief Creates a new ExperimentalDetectronGenerateProposalsSingleImage instance.
2156 using CNNLayer::CNNLayer;
2158 virtual ~ExperimentalDetectronGenerateProposalsSingleImageLayer();
2161 IE_SUPPRESS_DEPRECATED_END_WIN
2163 } // namespace InferenceEngine