Functions | |
Node | assign (NodeInput new_value, str variable_id, Optional[str] name=None) |
Return a node which produces the Assign operation. More... | |
Node | broadcast (NodeInput data, NodeInput target_shape, Optional[NodeInput] axes_mapping=None, str broadcast_spec="NUMPY", Optional[str] name=None) |
Create a node which broadcasts the input node's values along specified axes to a desired shape. More... | |
Node | bucketize (Node data, NodeInput buckets, str output_type="i64", bool with_right_bound=True, Optional[str] name=None) |
Return a node which produces the Bucketize operation. More... | |
Node | cum_sum (NodeInput arg, NodeInput axis, bool exclusive=False, bool reverse=False, Optional[str] name=None) |
Construct a cumulative summation operation. More... | |
Node | embedding_bag_offsets_sum (Node emb_table, NodeInput indices, NodeInput offsets, Optional[NodeInput] default_index=None, Optional[NodeInput] per_sample_weights=None, Optional[str] name=None) |
Return a node which performs sums of bags of embeddings without the intermediate embeddings. More... | |
Node | embedding_bag_packed_sum (NodeInput emb_table, NodeInput indices, Optional[NodeInput] per_sample_weights=None, Optional[str] name=None) |
Return an EmbeddingBagPackedSum node. More... | |
Node | embedding_segments_sum (Node emb_table, NodeInput indices, NodeInput segment_ids, Optional[NodeInput] num_segments=None, Optional[NodeInput] default_index=None, Optional[NodeInput] per_sample_weights=None, Optional[str] name=None) |
Return an EmbeddingSegmentsSum node. More... | |
Node | extract_image_patches (NodeInput image, TensorShape sizes, List[int] strides, TensorShape rates, str auto_pad, Optional[str] name=None) |
Return a node which produces the ExtractImagePatches operation. More... | |
Node | gru_cell (NodeInput X, NodeInput initial_hidden_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, bool linear_before_reset=False, Optional[str] name=None) |
Perform GRUCell operation on the tensor from input node. 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 | non_zero (NodeInput data, str output_type="i64", Optional[str] name=None) |
Return the indices of the elements that are non-zero. More... | |
Node | read_value (NodeInput init_value, str variable_id, Optional[str] name=None) |
Return a node which produces the Assign operation. More... | |
Node | rnn_cell (NodeInput X, NodeInput initial_hidden_state, NodeInput W, NodeInput R, NodeInput B, int hidden_size, List[str] activations, List[float] activations_alpha, List[float] activations_beta, float clip=0.0, Optional[str] name=None) |
Perform RNNCell operation on tensor from input node. More... | |
Node | roi_align (NodeInput data, NodeInput rois, NodeInput batch_indices, int pooled_h, int pooled_w, int sampling_ratio, float spatial_scale, str mode, Optional[str] name=None) |
Return a node which performs ROIAlign. More... | |
Node | scatter_elements_update (NodeInput data, NodeInput indices, NodeInput updates, NodeInput axis, Optional[str] name=None) |
Return a node which produces a ScatterElementsUpdate operation. More... | |
Node | scatter_update (Node data, NodeInput indices, NodeInput updates, NodeInput axis, Optional[str] name=None) |
Return a node which produces a ScatterUpdate operation. More... | |
Node | shape_of (NodeInput data, str output_type="i64", Optional[str] name=None) |
Return a node which produces a tensor containing the shape of its input data. More... | |
Node | shuffle_channels (Node data, int axis, int groups, Optional[str] name=None) |
Perform permutation on data in the channel dimension of the input tensor. More... | |
Node | topk (NodeInput data, NodeInput k, int axis, str mode, str sort, str index_element_type="i32", Optional[str] name=None) |
Return a node which performs TopK. More... | |
Node ngraph.opset3.ops.assign | ( | NodeInput | new_value, |
str | variable_id, | ||
Optional[str] | name = None |
||
) |
Return a node which produces the Assign operation.
new_value | Node producing a value to be assigned to a variable. |
variable_id | Id of a variable to be updated. |
name | Optional name for output node. |
Node ngraph.opset3.ops.broadcast | ( | NodeInput | data, |
NodeInput | target_shape, | ||
Optional[NodeInput] | axes_mapping = None , |
||
str | broadcast_spec = "NUMPY" , |
||
Optional[str] | name = None |
||
) |
Create a node which broadcasts the input node's values along specified axes to a desired shape.
data | The node with input tensor data. |
target_shape | The node with a new shape we want to broadcast tensor to. |
axes_mapping | The node with a axis positions (0-based) in the result that are being broadcast. |
broadcast_spec | The type of broadcasting that specifies mapping of input tensor axes to output shape axes. Range of values: NUMPY, EXPLICIT, BIDIRECTIONAL. |
name | Optional new name for output node. |
Node ngraph.opset3.ops.bucketize | ( | Node | data, |
NodeInput | buckets, | ||
str | output_type = "i64" , |
||
bool | with_right_bound = True , |
||
Optional[str] | name = None |
||
) |
Return a node which produces the Bucketize operation.
data | Input data to bucketize |
buckets | 1-D of sorted unique boundaries for buckets |
output_type | Output tensor type, "i64" or "i32", defaults to i64 |
with_right_bound | indicates whether bucket includes the right or left edge of interval. default true = includes right edge |
name | Optional name for output node. |
Node ngraph.opset3.ops.cum_sum | ( | NodeInput | arg, |
NodeInput | axis, | ||
bool | exclusive = False , |
||
bool | reverse = False , |
||
Optional[str] | name = None |
||
) |
Construct a cumulative summation operation.
arg | The tensor to be summed. |
axis | zero dimension tensor specifying axis position along which sum will be performed. |
exclusive | if set to true, the top element is not included |
reverse | if set to true, will perform the sums in reverse direction |
Node ngraph.opset3.ops.embedding_bag_offsets_sum | ( | Node | emb_table, |
NodeInput | indices, | ||
NodeInput | offsets, | ||
Optional[NodeInput] | default_index = None , |
||
Optional[NodeInput] | per_sample_weights = None , |
||
Optional[str] | name = None |
||
) |
Return a node which performs sums of bags of embeddings without the intermediate embeddings.
emb_table | Tensor containing the embedding lookup table. |
indices | Tensor with indices. |
offsets | Tensor containing the starting index positions of each bag in indices. |
per_sample_weights | Tensor with weights for each sample. |
default_index | Scalar containing default index in embedding table to fill empty bags. |
name | Optional name for output node. |
Node ngraph.opset3.ops.embedding_bag_packed_sum | ( | NodeInput | emb_table, |
NodeInput | indices, | ||
Optional[NodeInput] | per_sample_weights = None , |
||
Optional[str] | name = None |
||
) |
Return an EmbeddingBagPackedSum node.
EmbeddingSegmentsSum constructs an output tensor by replacing every index in a given input tensor with a row (from the weights matrix) at that index
emb_table | Tensor containing the embedding lookup table. |
indices | Tensor with indices. |
per_sample_weights | Weights to be multiplied with embedding table. |
name | Optional name for output node. |
Node ngraph.opset3.ops.embedding_segments_sum | ( | Node | emb_table, |
NodeInput | indices, | ||
NodeInput | segment_ids, | ||
Optional[NodeInput] | num_segments = None , |
||
Optional[NodeInput] | default_index = None , |
||
Optional[NodeInput] | per_sample_weights = None , |
||
Optional[str] | name = None |
||
) |
Return an EmbeddingSegmentsSum node.
EmbeddingSegmentsSum constructs an output tensor by replacing every index in a given input tensor with a row (from the weights matrix) at that index
emb_table | Tensor containing the embedding lookup table. |
indices | Tensor with indices. |
segment_ids | Tensor with indices into the output Tensor |
num_segments | Tensor with number of segments. |
default_index | Scalar containing default index in embedding table to fill empty bags. |
per_sample_weights | Weights to be multiplied with embedding table. |
name | Optional name for output node. |
Node ngraph.opset3.ops.extract_image_patches | ( | NodeInput | image, |
TensorShape | sizes, | ||
List[int] | strides, | ||
TensorShape | rates, | ||
str | auto_pad, | ||
Optional[str] | name = None |
||
) |
Return a node which produces the ExtractImagePatches operation.
image | 4-D Input data to extract image patches. |
sizes | Patch size in the format of [size_rows, size_cols]. |
strides | Patch movement stride in the format of [stride_rows, stride_cols] |
rates | Element seleciton rate for creating a patch. |
auto_pad | Padding type. |
name | Optional name for output node. |
Node ngraph.opset3.ops.gru_cell | ( | NodeInput | X, |
NodeInput | initial_hidden_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 , |
||
bool | linear_before_reset = False , |
||
Optional[str] | name = None |
||
) |
Perform GRUCell operation on the tensor from input node.
GRUCell represents a single GRU Cell that computes the output using the formula described in the paper: https://arxiv.org/abs/1406.1078
Note this class represents only single cell and not whole layer.
X | The input tensor with shape: [batch_size, input_size]. |
initial_hidden_state | The hidden state tensor at current time step with shape: [batch_size, hidden_size]. |
W | The weights for matrix multiplication, gate order: zrh. Shape: [3*hidden_size, input_size]. |
R | The recurrence weights for matrix multiplication. Shape: [3*hidden_size, hidden_size]. |
B | The sum of biases (weight and recurrence). For linear_before_reset set True the shape is [4*hidden_size]. Otherwise the shape is [3*hidden_size]. |
hidden_size | The number of hidden units for recurrent cell. Specifies hidden state size. |
activations | The vector of activation functions used inside recurrent cell. |
activation_alpha | The vector of alpha parameters for activation functions in order respective to activation list. |
activation_beta | The vector of beta parameters for activation functions in order respective to activation list. |
clip | The value defining clipping range [-clip, clip] on input of activation functions. |
linear_before_reset | Flag denotes if the layer behaves according to the modification of GRUCell described in the formula in the ONNX documentation. |
name | Optional output node name. |
Node ngraph.opset3.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.
boxes | Tensor with box coordinates. |
scores | Tensor with box scores. |
max_output_boxes_per_class | Tensor Specifying maximum number of boxes to be selected per class. |
iou_threshold | Tensor specifying intersection over union threshold |
score_threshold | Tensor specifying minimum score to consider box for the processing. |
box_encoding | Format of boxes data encoding. |
sort_result_descending | Flag that specifies whenever it is necessary to sort selected boxes across batches or not. |
output_type | Output element type. |
Node ngraph.opset3.ops.non_zero | ( | NodeInput | data, |
str | output_type = "i64" , |
||
Optional[str] | name = None |
||
) |
Return the indices of the elements that are non-zero.
data | Input data. |
output_type | Output tensor type. |
Node ngraph.opset3.ops.read_value | ( | NodeInput | init_value, |
str | variable_id, | ||
Optional[str] | name = None |
||
) |
Return a node which produces the Assign operation.
init_value | Node producing a value to be returned instead of an unassigned variable. |
variable_id | Id of a variable to be read. |
name | Optional name for output node. |
Node ngraph.opset3.ops.rnn_cell | ( | NodeInput | X, |
NodeInput | initial_hidden_state, | ||
NodeInput | W, | ||
NodeInput | R, | ||
NodeInput | B, | ||
int | hidden_size, | ||
List[str] | activations, | ||
List[float] | activations_alpha, | ||
List[float] | activations_beta, | ||
float | clip = 0.0 , |
||
Optional[str] | name = None |
||
) |
Perform RNNCell operation on tensor from input node.
It follows notation and equations defined as in ONNX standard: https://github.com/onnx/onnx/blob/master/docs/Operators.md#RNN
Note this class represents only single cell and not whole RNN layer.
X | The input tensor with shape: [batch_size, input_size]. |
initial_hidden_state | The hidden state tensor at current time step with shape: [batch_size, hidden_size]. |
W | The weight tensor with shape: [hidden_size, input_size]. |
R | The recurrence weight tensor with shape: [hidden_size, hidden_size]. |
B | The bias tensor for input gate with shape: [2*hidden_size]. |
hidden_size | The number of hidden units for recurrent cell. Specifies hidden state size. |
activations | The vector of activation functions used inside recurrent cell. |
activation_alpha | The vector of alpha parameters for activation functions in order respective to activation list. |
activation_beta | The vector of beta parameters for activation functions in order respective to activation list. |
clip | The value defining clipping range [-clip, clip] on input of activation functions. |
name | Optional output node name. |
Node ngraph.opset3.ops.roi_align | ( | NodeInput | data, |
NodeInput | rois, | ||
NodeInput | batch_indices, | ||
int | pooled_h, | ||
int | pooled_w, | ||
int | sampling_ratio, | ||
float | spatial_scale, | ||
str | mode, | ||
Optional[str] | name = None |
||
) |
Return a node which performs ROIAlign.
data | Input data. |
rois | RoIs (Regions of Interest) to pool over. |
batch_indices | Tensor with each element denoting the index of the corresponding image in the batch. |
pooled_h | Height of the ROI output feature map. |
pooled_w | Width of the ROI output feature map. |
sampling_ratio | Number of bins over height and width to use to calculate each output feature map element. |
spatial_scale | Multiplicative spatial scale factor to translate ROI coordinates. |
mode | Method to perform pooling to produce output feature map elements. |
Node ngraph.opset3.ops.scatter_elements_update | ( | NodeInput | data, |
NodeInput | indices, | ||
NodeInput | updates, | ||
NodeInput | axis, | ||
Optional[str] | name = None |
||
) |
Return a node which produces a ScatterElementsUpdate operation.
ScatterElementsUpdate creates a copy of the first input tensor with updated elements specified with second and third input tensors.
For each entry in `updates`, the target index in `data` is obtained by combining the corresponding entry in `indices` with the index of the entry itself: the index-value for dimension equal to `axis` is obtained from the value of the corresponding entry in `indices` and the index-value for dimension not equal to `axis` is obtained from the index of the entry itself. @param data: The input tensor to be updated. @param indices: The tensor with indexes which will be updated. @param updates: The tensor with update values. @param axis: The axis for scatter. @return ScatterElementsUpdate node
Node ngraph.opset3.ops.scatter_update | ( | Node | data, |
NodeInput | indices, | ||
NodeInput | updates, | ||
NodeInput | axis, | ||
Optional[str] | name = None |
||
) |
Return a node which produces a ScatterUpdate operation.
ScatterUpdate sets new values to slices from data addressed by indices.
data | The input tensor to be updated. |
indices | The tensor with indexes which will be updated. |
updates | The tensor with update values. |
axis | The axis at which elements will be updated. |
Node ngraph.opset3.ops.shape_of | ( | NodeInput | data, |
str | output_type = "i64" , |
||
Optional[str] | name = None |
||
) |
Return a node which produces a tensor containing the shape of its input data.
data | The tensor containing the input data. :para output_type: Output element type. |
Node ngraph.opset3.ops.shuffle_channels | ( | Node | data, |
int | axis, | ||
int | groups, | ||
Optional[str] | name = None |
||
) |
Perform permutation on data in the channel dimension of the input tensor.
The operation is the equivalent with the following transformation of the input tensor data
of shape [N, C, H, W]:
data_reshaped
= reshape(data
, [N, group, C / group, H * W])
data_trnasposed
= transpose(data_reshaped
, [0, 2, 1, 3])
output
= reshape(data_trnasposed
, [N, C, H, W])
For example:
@param data: The node with input tensor. @param axis: Channel dimension index in the data tensor. A negative value means that the index should be calculated from the back of the input data shape. @param group: The channel dimension specified by the axis parameter should be split into this number of groups. @param name: Optional output node name. @return The new node performing a permutation on data in the channel dimension of the input tensor.
Node ngraph.opset3.ops.topk | ( | NodeInput | data, |
NodeInput | k, | ||
int | axis, | ||
str | mode, | ||
str | sort, | ||
str | index_element_type = "i32" , |
||
Optional[str] | name = None |
||
) |
Return a node which performs TopK.
data | Input data. |
k | K. |
axis | TopK Axis. |
mode | Compute TopK largest ('max') or smallest ('min') |
sort | Order of output elements (sort by: 'none', 'index' or 'value') |
index_element_type | Type of output tensor with indices. |