set_op_input_tensor_multi_dims

Description

Applies to subgraph-wide dynamic dimension size and specifies the input shape of an operator and dimension size profiles in the online inference scenario.

This API is a trial API and should not be directly used by developers.

Prototype

def set_op_input_tensor_multi_dims(tensor, input_shape, input_dims)

Parameters

Parameter

Input/Output

Description

tensor

Input

Output tensor of the target operator.

input_shape

Input

Shapes of all input tensors of the target operator. For example:

If the target operator has two input tensors:
"0: -1, -1, 3; 1: 2, 2, -1, 224"

input_dims

Input

Dynamic dimension size profiles. Separate profiles with semicolons (;). The number and sequence of dimension sizes in each profile must be the same as those of -1 in input_shape. For example:

If there are three profiles:
"480, 480, 112; 960, 960, 224; 1920, 1920, 448"

Returns

None

Restrictions

This API must work with the subgraph_multi_dims_scope API, and the target operator must be the input node of the target scope.

Example

See Example.