--input_shape_range

Description

Sets the shape range of each input.

This option has been deprecated. Avoid using it. To specify the shape range of each input to a model, use --input_shape.

See Also

This option is mutually exclusive with --dynamic_batch_size, --dynamic_image_size, and --dynamic_dims.

Argument

Argument: Shape range of each input, for example, "input_name1:[n1~n2,c1,h1,w1];input_name2:[n2,c2,h2,w2]". Enclose all the nodes in double quotation marks (""), and separate the nodes with semicolons (;). input_name must be the node name in the network model before conversion.

Restrictions:

  • The shape range must be placed in square brackets ([]).
  • This option does not limit the dimension. You can specify the range of any value in the dimension.
  • If you do not want to specify the dimension value, set this option to -1, indicating that the dimension can use any value greater than or equal to 0.

Suggestions and Benefits

None

Example

--input_shape_range="input1:[8~20,3,5,-1];input2:[5,3~9,10,-1]"

Applicability

Atlas Training Series Product

Dependencies and Restrictions

  • Option Usage:
    • This option applies only to TensorFlow and ONNX networks.
    • If this option is used and the AIPP function is configured by using --insert_op_conf, the width and height of the AIPP output image must be within the range configured in --input_shape_range.
  • API Usage:

    If this option is used to set the shape range during model conversion, call aclmdlSetDatasetTensorDesc to set the actual input tensor description (input shape range) before aclmdlExecute during model inference. After model execution, call aclmdlGetDatasetTensorDesc to obtain the tensor description dynamically output by the model. Then, call the APIs under aclTensorDesc to obtain the memory size occupied by the output tensor data, tensor format, and tensor dimensions.

    For details about how to use aclmdlSetDatasetTensorDesc and aclmdlGetDatasetTensorDesc, see " " aclprofCreateConfig"" in CANN AscendCL Application Software Development Guide (C&C++).