namespace ngraph::builder::opset1¶
Overview¶
namespace opset1 {
// global functions
Output<Node>const Output<Node>&const Output<Node>&size_t legacy_broadcast_for_binary_operation(
,
,
);
std::vector<std::size_t>const Shape&const AxisSet& get_axes_mapping(, );
Output<Node>const Shape&const Shape&std::size_t get_axes_mapping_output(, , );
Output<Node>const PartialShape&const PartialShape&std::size_t get_axes_mapping_output(
,
,
);
Output<Node>const Shape&const AxisSet& get_axes_mapping_output(, );
Output<Node>const Output<Node>&const Shape&const AxisSet& make_broadcast(, , );
Output<Node>const Output<Node>&const Shape&std::size_t make_broadcast(, , );
std::shared_ptr<Node>const Output<Node>&const Output<Node>&bool l0_norm(, , );
std::shared_ptr<Node>const Output<Node>&const Output<Node>&floatbool l1_norm(
,
,
,
);
std::shared_ptr<Node>const Output<Node>&const Output<Node>&floatBiasModebool l2_norm(
,
,
,
,
);
std::shared_ptr<Node>const Output<Node>&const Output<Node>&std::size_tfloatbool lp_norm(
,
,
,
,
);
std::shared_ptr<Node>const Output<Node>&const AxisSet&bool mean(, , );
std::shared_ptr<Node>const Output<Node>&const Output<Node>&bool mean(, , );
std::shared_ptr<Node>const Output<Node>&const AxisSet&const bool variance(, , );
std::shared_ptr<Node>const Output<Node>&const Output<Node>&boolbool variance(
,
,
,
);
std::shared_ptr<Node>const Output<Node>&const Shape& reshape(, );
std::shared_ptr<Node>const Output<Node>&std::vector<size_t> reorder_axes(, );
std::shared_ptr<Node>const Output<Node>& transpose();
std::shared_ptr<Node>const Output<Node>&int flatten(, );
std::shared_ptr<Node>const Output<Node>&std::size_t expand_dims(, );
std::shared_ptr<Node>const Output<Node>&std::vector<std::size_t> squeeze(, );
std::shared_ptr<Node>const Output<Node>&const std::size_tconst std::size_t collapse(
,
,
);
OutputVectorconst Output<Node>&const std::vector<int64_t>&int64_t split(, , );
OutputVectorconst Output<Node>&int64_tint64_t split(, , );
} // namespace opset1
Detailed Documentation¶
Global Functions¶
Broadcast right node to left node’s shape using legacy scheme.
Parameters:
left |
The left hand side node of binary operation. |
right |
The right hand side node of binary operation. The one to be broadcasted. |
start_match_axis |
The axis index starting mutually equal shapes of both nodes. |
Returns:
The Output object connected to node producing broadcasted right node.
Reconstructs axes mapping vector for Broadcast:v1 operation.
Parameters:
output_shape |
The output shape of Broadcast operation. |
broadcast_axes |
The broadcast axes used for Broadcast:v0 operator. |
Returns:
The vector with axes indexes mapping .
Creates Node returning the axes mapping for Broadcast:v1 operation.
Parameters:
output_shape |
The output shape of Broadcast operation. |
input_shape |
The input shape. |
start_match_axis |
The axis index at which input shape starts to be identical as the output shape. |
Returns:
Returns the Output object pointing to node with the axes mapping.
Output<Node>const PartialShape&const PartialShape&std::size_t get_axes_mapping_output(
,
,
)
Creates Node returning the axes mapping for Broadcast operation.
Shapes’ ranks need to be static.
Parameters:
output_shape |
The output shape of Broadcast operation. |
input_shape |
The input shape. |
start_match_axis |
The axis index at which input shape starts to be identical to consecutive subset of output shape dimensions. |
Returns:
Returns the Output object pointing to node with the axes mapping.
Creates Node returning the axes mapping for Broadcast:v1 operation.
Parameters:
output_shape |
The output shape of Broadcast operation. |
broadcast_axes |
The broadcast axes used for Broadcast:v0 operator. |
Returns:
The Output object with Node returning axes mapping.
Calculates L-0 norm of input tensor.
The L-0 norm represents the cardinality of elements different from zero. This actually is not a “true” norm.
Parameters:
value |
The input tensor. |
reduction_axes |
The axes along which we calculate norm. |
keep_dims |
The flag indicates if axes will be removed or kept. |
Returns:
L-0 norm of value. The output sub-graph is composed of v1 ops.
Calculates L-1 norm of a value.
The L-1 norm represents the sum of absolute values.
Parameters:
value |
The input tensor. |
reduction_axes |
The axes along which we calculate norm. |
bias |
The bias added to the calculated sum. |
keep_dims |
The flag indicates if axes will be removed or kept. |
Returns:
L-1 norm of value. The output sub-graph is composed of v1 ops.
Calculates L-2 norm of input tensor.
The L-2 norm represents the square root of sum of squares of each individual element.
Parameters:
value |
The input tensor. |
reduction_axes |
The axes along which we calculate norm. |
bias |
The bias combined with calculated sum. |
bias_mode |
The method of bias application. |
keep_dims |
The flag indicates if axes will be removed or kept. |
Returns:
L-2 norm of value. The output sub-graph is composed of v1 ops.
Creates node which calculates L-p norm on input tensor.
Parameters:
value |
The input tensor. |
reduction_axes |
The axes along which we calculate norm. |
p_norm |
The p norm to calculate. |
bias |
The bias added to the calculated sum. |
keep_dims |
The flag indicates if axes will be removed or kept. |
Returns:
L-p norm of value. The output sub-graph is composed of v1 ops.
Sum-based Mean of a Tensor.
Calculates
\(\sum_{i=1}^{N} \frac{x_i}{N}\)
Where i
traverses all of the axes provided in reduction_axes
Inputs¶
node
| \(E[d_1,\dots,d_n]~(n \geq 0)\) | An input tensor of any shape | | reduction_axes
| AxesSet | The axes to eliminate through reduction (0 indexed). | | keep_dims
| bool | If set to true it holds reduced axes. |Output¶
Type |
Description |
---|---|
\(E[\textit{delete}(A,d_1,\dots,d_n)]\) |
The tensor \(T\) , where \(T\) is the input tensor with the |
Sum-based Variance of a Tensor.
If bessel_correct is true, calculates
\(\frac{\sum_{i=1}^{N}\left(x_i-\bar{x}\right)^2}{N-1}\)
else, calculates
\(\frac{\sum_{i=1}^{N}\left(x_i-\bar{x}\right)^2}{N}\)
Where i
traverses all of the axes provided in reduction_axes
and \(\bar{x} = \sum_{i=1}^{N} \frac{x_i}{N}\)
Inputs¶
Type |
Description |
|
---|---|---|
|
bool (default = false) |
Enable Bessel’s correction to std_dev for Small sample sizes |
Output¶
Type |
Description |
---|---|
\(E[\textit{delete}(A,d_1,\dots,d_n)]\) |
The tensor \(T\) , where \(T\) is the input tensor with the |
Change shape of a value.
Parameters:
value |
The value to be reshaped. |
shape |
The new shape. |
Returns:
Reshape:v1 op.
Permute axes according to specified axes_order parameter.
Parameters:
The |
vlaue whose axes we want to permute. |
axes_order |
The permutation of axes. |
Returns:
Transpose:v1 op.
Return transposed value (with axes in reversed order).
Parameters:
Value |
to transpose. |
Returns:
Transpose:v1 op.
Flatten a value into a 2D matrix, with a static dividing axis.
Parameters:
The |
tensor to be flattened. |
The |
axis dividing shape. |
Returns:
The new value will be a 2D matrix representing the flattened input node.
Expands node tensor shape with empty axis at specified position.
Parameters:
value |
The value to be expanded. |
axis |
The position in the expanded axes where the new axis is placed. |
Returns:
Reshape:v1 op.
Remove empty axes from input tensor.
Parameters:
value |
The value to be squeezed. |
axes |
The vector defining indexes of axes to be removed. |
Returns:
Reshape:v1 op.
Collapse specified axes into single one.
Collapsed axes create a continuous range starting from outermost axis.
Parameters:
value |
The value to be reshaped. |
start_axis |
The start axis index. |
end_axis |
The end axis (inclusive) index. |
Returns:
The node with collapsed specified axes.
OutputVectorconst Output<Node>&const std::vector<int64_t>&int64_t split(, , )
Split value on specified axis into multiple parts.
This implementation supports negative axis
values (similar to NumPy indexing). This means that the axis to split on will be counted from the back of the tensor (negative values are subtracted from its rank).
Parameters:
value |
The value to be split. |
split_lengths |
The vector defining the lengths of each split part. |
axis |
The axis we split input node on. Default value is zero axis. |
Returns:
The vector containing multiple outputs we split input node into. The vector is output of Split:v1 op
OutputVectorconst Output<Node>&int64_tint64_t split(, , )
Split value on specified axis into multiple parts.
This implementation supports negative axis
values (similar to NumPy indexing). This means that the axis to split on will be counted from the back of the tensor (negative values are subtracted from its rank).
Parameters:
value |
The value to split. |
num_splits |
The number of parts we want to split output at given axis. The length of the axis to split must be divisible by this value. |
axis |
The axis we split input node on. Default value is zero axis. |
Returns:
The vector containing multiple nodes we split input node into. The vector is output of VariadicSplit:v1 op