Functions
ngraph.opset2.ops Namespace Reference

Functions

Node batch_to_space (NodeInput data, NodeInput block_shape, NodeInput crops_begin, NodeInput crops_end, Optional[str] name=None)
 Perform BatchToSpace operation on the input tensor. More...
 
Node gelu (NodeInput node, Optional[str] name=None)
 Perform Gaussian Error Linear Unit operation element-wise on data from input node. More...
 
Node mvn (Node data, bool across_channels=False, bool normalize_variance=False, float eps=1e-9, str name=None)
 Perform Mean Variance Normalization operation on data from input node. More...
 
Node reorg_yolo (Node input, List[int] stride, Optional[str] name=None)
 Return a node which produces the ReorgYolo operation. More...
 
Node roi_pooling (NodeInput input, NodeInput coords, TensorShape output_size, NumericData spatial_scale, str method, Optional[str] name=None)
 Return a node which produces an ROIPooling operation. More...
 
Node space_to_batch (NodeInput data, NodeInput block_shape, NodeInput pads_begin, NodeInput pads_end, Optional[str] name=None)
 Perform SpaceToBatch operation on the input tensor. More...
 

Function Documentation

◆ batch_to_space()

Node ngraph.opset2.ops.batch_to_space ( NodeInput  data,
NodeInput  block_shape,
NodeInput  crops_begin,
NodeInput  crops_end,
Optional[str]   name = None 
)

Perform BatchToSpace operation on the input tensor.

BatchToSpace permutes data from the batch dimension of the data tensor into spatial dimensions.

Parameters
dataNode producing the data tensor.
block_shapeThe sizes of the block of values to be moved.
crops_beginSpecifies the amount to crop from the beginning along each axis of data.
crops_endSpecifies the amount to crop from the end along each axis of data.
nameOptional output node name.
Returns
The new node performing a BatchToSpace operation.

◆ gelu()

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

Perform Gaussian Error Linear Unit operation element-wise on data from input node.

Computes GELU function:

\[ f(x) = 0.5\cdot x\cdot(1 + erf( \dfrac{x}{\sqrt{2}}) \]

For more information refer to: Gaussian Error Linear Unit (GELU) <https://arxiv.org/pdf/1606.08415.pdf>_

Parameters
nodeInput tensor. One of: input node, array or scalar.
nameOptional output node name.
Returns
The new node performing a GELU operation on its input data element-wise.

◆ mvn()

Node ngraph.opset2.ops.mvn ( Node  data,
bool   across_channels = False,
bool   normalize_variance = False,
float   eps = 1e-9,
str   name = None 
)

Perform Mean Variance Normalization operation on data from input node.

Computes MVN on the input tensor data (called X) using formula:

\[ Y = \dfrac{X-EX}{\sqrt{E(X-EX)^2}} \]

Parameters
dataThe node with data tensor.
across_channelsDenotes if mean values are shared across channels.
normalize_varianceDenotes whether to perform variance normalization.
epsThe number added to the variance to avoid division by zero when normalizing the value. Scalar value.
nameOptional output node name.
Returns
The new node performing a MVN operation on input tensor.

◆ reorg_yolo()

Node ngraph.opset2.ops.reorg_yolo ( Node  input,
List[int]  stride,
Optional[str]   name = None 
)

Return a node which produces the ReorgYolo operation.

Parameters
inputInput data
strideStride to reorganize input by
nameOptional name for output node.
Returns
ReorgYolo node

◆ roi_pooling()

Node ngraph.opset2.ops.roi_pooling ( NodeInput  input,
NodeInput  coords,
TensorShape  output_size,
NumericData  spatial_scale,
str  method,
Optional[str]   name = None 
)

Return a node which produces an ROIPooling operation.

Parameters
inputInput feature map {N, C, ...}
coordsCoordinates of bounding boxes
output_sizeHeight/Width of ROI output features (shape)
spatial_scaleRatio of input feature map over input image size (float)
methodMethod of pooling - string: "max" or "bilinear"
Returns
ROIPooling node

◆ space_to_batch()

Node ngraph.opset2.ops.space_to_batch ( NodeInput  data,
NodeInput  block_shape,
NodeInput  pads_begin,
NodeInput  pads_end,
Optional[str]   name = None 
)

Perform SpaceToBatch operation on the input tensor.

SpaceToBatch permutes data tensor blocks of spatial data into batch dimension. The operator returns a copy of the input tensor where values from spatial blocks dimensions are moved in the batch dimension

Parameters
dataNode producing the data tensor.
block_shapeThe sizes of the block of values to be moved.
pads_beginSpecifies the padding for the beginning along each axis of data.
pads_endSpecifies the padding for the ending along each axis of data.
nameOptional output node name.
Returns
The new node performing a SpaceToBatch operation.