--is_output_adjust_hw_layout

Applicable Products

All processors

Description

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

See Also

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

    The number of values of --is_output_adjust_hw_layout must match the number of nodes specified by --out_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 output data type to float16 and the output data format to NC1HWC0 for a network model.
  • false (default): Does not specify the output data type or format.

Suggestions and Benefits

None

Example

  • If one node is configured by --out_nodes:
    atc --model=$HOME/module/resnet50_tensorflow.pb --framework=3 --output=$HOME/module/out/tf_resnet50 --is_output_adjust_hw_layout=true  --out_nodes="prob:0" --soc_version=<soc_version>
  • If multiple nodes are configured by --out_nodes:
    atc --model=$HOME/module/resnet50_tensorflow.pb --framework=3 --output=$HOME/module/out/tf_resnet50 --is_output_adjust_hw_layout="true,true"  --out_nodes="prob:0;prob:1" --soc_version=<soc_version>

Dependencies and Restrictions

None