--is_input_adjust_hw_layout

Applicable Products

All processors

Description

Sets the data type of network model inputs to float16 and the data format to NC1HWC0 together with --input_fp16_nodes. Setting this option separately does not take effect, but the model will be successfully converted.

See Also

  • If --is_input_adjust_hw_layout is set to true, it must be used together with --input_fp16_nodes. For nodes specified by --input_fp16_nodes, the input data type is float16 and the input data format is NC1HWC0.

    The number of values of --is_input_adjust_hw_layout must match the number of nodes specified by --input_fp16_nodes. Use commas (,) to separate multiple values.

  • When --framework is set to 1, this option is invalid in the MindSpore framework, but the model will be successfully converted.

Arguments

  • true: Sets the input data type to float16 and the input data format to NC1HWC0 for a network model.
  • false (default): Does not specify the input data type or format.

Suggestions and Benefits

None

Example

  • If one node is configured by --input_fp16_nodes:
    atc --model=$HOME/module/resnet50_tensorflow.pb --framework=3 --output=$HOME/module/out/tf_resnet50 --is_input_adjust_hw_layout=true  --input_fp16_nodes="data" --soc_version=<soc_version>
  • If multiple nodes are configured by --input_fp16_nodes:
    atc --model=$HOME/module/resnet50_tensorflow.pb --framework=3 --output=$HOME/module/out/tf_resnet50 --is_input_adjust_hw_layout="true,true"  --input_fp16_nodes="data1;data2" --soc_version=<soc_version>

Dependencies and Restrictions

None