Functions
ngraph.opset4.ops Namespace Reference

Functions

Node ctc_loss (NodeInput logits, NodeInput logit_length, NodeInput labels, NodeInput label_length, Optional[NodeInput] blank_index=None, bool preprocess_collapse_repeated=False, bool ctc_merge_repeated=True, bool unique=False, Optional[str] name=None)
 Return a node which performs CTCLoss. More...
 
Node non_max_suppression (NodeInput boxes, NodeInput scores, Optional[NodeInput] max_output_boxes_per_class=None, Optional[NodeInput] iou_threshold=None, Optional[NodeInput] score_threshold=None, str box_encoding="corner", bool sort_result_descending=True, str output_type="i64", Optional[str] name=None)
 Return a node which performs NonMaxSuppression. More...
 
Node softplus (NodeInput data, Optional[str] name=None)
 Apply SoftPlus operation on each element of input tensor. More...
 
Node mish (NodeInput data, Optional[str] name=None)
 Return a node which performs Mish. More...
 
Node hswish (NodeInput data, Optional[str] name=None)
 Return a node which performs HSwish (hard version of Swish). More...
 
Node swish (NodeInput data, Optional[NodeInput] beta=None, Optional[str] name=None)
 Return a node which performing Swish activation function Swish(x, beta=1.0) = x * sigmoid(x * beta)). More...
 
Node acosh (NodeInput node, Optional[str] name=None)
 Apply hyperbolic inverse cosine function on the input node element-wise. More...
 
Node asinh (NodeInput node, Optional[str] name=None)
 Apply hyperbolic inverse sinus function on the input node element-wise. More...
 
Node atanh (NodeInput node, Optional[str] name=None)
 Apply hyperbolic inverse tangent function on the input node element-wise. More...
 
Node proposal (Node class_probs, Node bbox_deltas, NodeInput image_shape, dict attrs, Optional[str] name=None)
 Filter bounding boxes and outputs only those with the highest prediction confidence. More...
 
Node reduce_l1 (NodeInput node, NodeInput reduction_axes, bool keep_dims=False, Optional[str] name=None)
 L1-reduction operation on input tensor, eliminating the specified reduction axes. More...
 
Node reduce_l2 (NodeInput node, NodeInput reduction_axes, bool keep_dims=False, Optional[str] name=None)
 L2-reduction operation on input tensor, eliminating the specified reduction axes. More...
 
Node lstm_cell (NodeInput X, NodeInput initial_hidden_state, NodeInput initial_cell_state, NodeInput W, NodeInput R, NodeInput B, int hidden_size, List[str] activations=None, List[float] activations_alpha=None, List[float] activations_beta=None, float clip=0.0, Optional[str] name=None)
 Return a node which performs LSTMCell operation. More...
 

Function Documentation

◆ acosh()

Node ngraph.opset4.ops.acosh ( NodeInput  node,
Optional[str]   name = None 
)

Apply hyperbolic inverse cosine function on the input node element-wise.

@param node: One of: input node, array or scalar.
@param name: Optional new name for output node.
@return New node with arccosh operation applied on it.

◆ asinh()

Node ngraph.opset4.ops.asinh ( NodeInput  node,
Optional[str]   name = None 
)

Apply hyperbolic inverse sinus function on the input node element-wise.

@param node: One of: input node, array or scalar.
@param name: Optional new name for output node.
@return New node with arcsinh operation applied on it.

◆ atanh()

Node ngraph.opset4.ops.atanh ( NodeInput  node,
Optional[str]   name = None 
)

Apply hyperbolic inverse tangent function on the input node element-wise.

@param node: One of: input node, array or scalar.
@param name: Optional new name for output node.
@return New node with arctanh operation applied on it.

◆ ctc_loss()

Node ngraph.opset4.ops.ctc_loss ( NodeInput  logits,
NodeInput  logit_length,
NodeInput  labels,
NodeInput  label_length,
Optional[NodeInput]   blank_index = None,
bool   preprocess_collapse_repeated = False,
bool   ctc_merge_repeated = True,
bool   unique = False,
Optional[str]   name = None 
)

Return a node which performs CTCLoss.

@param logits:                        3-D tensor of logits.
@param logit_length:                  1-D tensor of lengths for each object from a batch.
@param labels:                        2-D tensor of labels for which likelihood is estimated using logits.
@param label_length:                  1-D tensor of length for each label sequence.
@param blank_index:                   Scalar used to mark a blank index.
@param preprocess_collapse_repeated:  Flag for preprocessing labels before loss calculation.
@param ctc_merge_repeated:            Flag for merging repeated characters in a potential alignment.
@param unique:                        Flag to find unique elements in a target.
@return The new node which performs CTCLoss

◆ hswish()

Node ngraph.opset4.ops.hswish ( NodeInput  data,
Optional[str]   name = None 
)

Return a node which performs HSwish (hard version of Swish).

@param data: Tensor with input data floating point type.
@return The new node which performs HSwish

◆ lstm_cell()

Node ngraph.opset4.ops.lstm_cell ( NodeInput  X,
NodeInput  initial_hidden_state,
NodeInput  initial_cell_state,
NodeInput  W,
NodeInput  R,
NodeInput  B,
int  hidden_size,
List[str]   activations = None,
List[float]   activations_alpha = None,
List[float]   activations_beta = None,
float   clip = 0.0,
Optional[str]   name = None 
)

Return a node which performs LSTMCell operation.

@param X: The input tensor with shape: [batch_size, input_size].
@param initial_hidden_state: The hidden state tensor with shape: [batch_size, hidden_size].
@param initial_cell_state: The cell state tensor with shape: [batch_size, hidden_size].
@param W: The weight tensor with shape: [4*hidden_size, input_size].
@param R: The recurrence weight tensor with shape: [4*hidden_size, hidden_size].
@param B: The bias tensor for gates with shape: [4*hidden_size].
@param hidden_size: Specifies hidden state size.
@param activations: The list of three activation functions for gates.
@param activations_alpha: The list of alpha parameters for activation functions.
@param activations_beta: The list of beta parameters for activation functions.
@param clip: Specifies bound values [-C, C] for tensor clipping performed before activations.
@param name: An optional name of the output node.

@return The new node represents LSTMCell. Node outputs count: 2.

◆ mish()

Node ngraph.opset4.ops.mish ( NodeInput  data,
Optional[str]   name = None 
)

Return a node which performs Mish.

@param data: Tensor with input data floating point type.
@return The new node which performs Mish

◆ non_max_suppression()

Node ngraph.opset4.ops.non_max_suppression ( NodeInput  boxes,
NodeInput  scores,
Optional[NodeInput]   max_output_boxes_per_class = None,
Optional[NodeInput]   iou_threshold = None,
Optional[NodeInput]   score_threshold = None,
str   box_encoding = "corner",
bool   sort_result_descending = True,
str   output_type = "i64",
Optional[str]   name = None 
)

Return a node which performs NonMaxSuppression.

@param boxes: Tensor with box coordinates.
@param scores: Tensor with box scores.
@param max_output_boxes_per_class: Tensor Specifying maximum number of boxes
                                    to be selected per class.
@param iou_threshold: Tensor specifying intersection over union threshold
@param score_threshold: Tensor specifying minimum score to consider box for the processing.
@param box_encoding: Format of boxes data encoding.
@param sort_result_descending: Flag that specifies whenever it is necessary to sort selected
                               boxes across batches or not.
@param output_type: Output element type.
@return The new node which performs NonMaxSuppression

◆ proposal()

Node ngraph.opset4.ops.proposal ( Node  class_probs,
Node  bbox_deltas,
NodeInput  image_shape,
dict  attrs,
Optional[str]   name = None 
)

Filter bounding boxes and outputs only those with the highest prediction confidence.

@param  class_probs:        4D input floating point tensor with class prediction scores.
@param  bbox_deltas:        4D input floating point tensor with corrected predictions of bounding boxes
@param  image_shape:        The 1D input tensor with 3 or 4 elements describing image shape.
@param  attrs:              The dictionary containing key, value pairs for attributes.
@param  name:               Optional name for the output node.
* base_size     The size of the anchor to which scale and ratio attributes are applied.
                Range of values: a positive unsigned integer number
                Default value: None
                Required: yes
* pre_nms_topn  The number of bounding boxes before the NMS operation.
                Range of values: a positive unsigned integer number
                Default value: None
                Required: yes
* post_nms_topn The number of bounding boxes after the NMS operation.
                Range of values: a positive unsigned integer number
                Default value: None
                Required: yes
* nms_thresh    The minimum value of the proposal to be taken into consideration.
                Range of values: a positive floating-point number
                Default value: None
                Required: yes
* feat_stride   The step size to slide over boxes (in pixels).
                Range of values: a positive unsigned integer
                Default value: None
                Required: yes
* min_size      The minimum size of box to be taken into consideration.
                Range of values: a positive unsigned integer number
                Default value: None
                Required: yes
* ratio         The ratios for anchor generation.
                Range of values: a list of floating-point numbers
                Default value: None
                Required: yes
* scale         The scales for anchor generation.
                Range of values: a list of floating-point numbers
                Default value: None
                Required: yes
* clip_before_nms   The flag that specifies whether to perform clip bounding boxes before
                    non-maximum suppression or not.
                    Range of values: True or False
                    Default value: True
                    Required: no
* clip_after_nms    The flag that specifies whether to perform clip bounding boxes after
                    non-maximum suppression or not.
                    Range of values: True or False
                    Default value: False
                    Required: no
* normalize     The flag that specifies whether to perform normalization of output boxes to
                [0,1] interval or not.
                Range of values: True or False
                Default value: False
                Required: no
* box_size_scale    Specifies the scale factor applied to logits of box sizes before decoding.
                    Range of values: a positive floating-point number
                    Default value: 1.0
                    Required: no
* box_coordinate_scale  Specifies the scale factor applied to logits of box coordinates
                        before decoding.
                        Range of values: a positive floating-point number
                        Default value: 1.0
                        Required: no
* framework     Specifies how the box coordinates are calculated.
                Range of values: "" (empty string) - calculate box coordinates like in Caffe*
                                 tensorflow - calculate box coordinates like in the TensorFlow*
                                              Object Detection API models
                Default value: "" (empty string)
                Required: no

Example of attribute dictionary:
@code{.py}
    # just required ones
    attrs = {
        'base_size': 85,
        'pre_nms_topn': 10,
        'post_nms_topn': 20,
        'nms_thresh': 0.34,
        'feat_stride': 16,
        'min_size': 32,
        'ratio': [0.1, 1.5, 2.0, 2.5],
        'scale': [2, 3, 3, 4],
    }
@endcode
Optional attributes which are absent from dictionary will be set with corresponding default.
@return Node representing Proposal operation.

◆ reduce_l1()

Node ngraph.opset4.ops.reduce_l1 ( NodeInput  node,
NodeInput  reduction_axes,
bool   keep_dims = False,
Optional[str]   name = None 
)

L1-reduction operation on input tensor, eliminating the specified reduction axes.

@param node:           The tensor we want to mean-reduce.
@param reduction_axes: The axes to eliminate through mean operation.
@param keep_dims:      If set to True it holds axes that are used for reduction
@param name:           Optional name for output node.
@return The new node performing mean-reduction operation.

◆ reduce_l2()

Node ngraph.opset4.ops.reduce_l2 ( NodeInput  node,
NodeInput  reduction_axes,
bool   keep_dims = False,
Optional[str]   name = None 
)

L2-reduction operation on input tensor, eliminating the specified reduction axes.

@param node:           The tensor we want to mean-reduce.
@param reduction_axes: The axes to eliminate through mean operation.
@param keep_dims:      If set to True it holds axes that are used for reduction
@param name:           Optional name for output node.
@return The new node performing mean-reduction operation.

◆ softplus()

Node ngraph.opset4.ops.softplus ( NodeInput  data,
Optional[str]   name = None 
)

Apply SoftPlus operation on each element of input tensor.

@param data: The tensor providing input data.
@return The new node with SoftPlus operation applied on each element.

◆ swish()

Node ngraph.opset4.ops.swish ( NodeInput  data,
Optional[NodeInput]   beta = None,
Optional[str]   name = None 
)

Return a node which performing Swish activation function Swish(x, beta=1.0) = x * sigmoid(x * beta)).

@param data: Tensor with input data floating point type.
@return The new node which performs Swish