--input_format
Description
Sets the model input format.
See Also
None
Arguments
Arguments:
- If the original framework is Caffe, the supported formats include NCHW (default) and ND (any format with N ≤ 4).
- If the original framework is ONNX, the supported formats include NCHW (default), NCDHW, and ND (any format with N ≤ 4).
- If the original framework is TensorFlow, the supported formats include NCHW, NHWC (default), ND, NCDHW, and NDHWC.
- For a TensorFlow model converted using the ONNX model conversion tool, this option is required and the value must be NCHW.
- If the original model contains an operator with the argument data_format, this option is required and ND is recommended. During tuning, the format is inferred based on the operator with data_format. If the input data format cannot be determined, ND is recommended.
- If the original framework is MindSpore, only the NCHW format is allowed.
Default: NCHW for Caffe and ONNX; NHWC for TensorFlow
Restrictions:
- If AIPP is enabled during tuning and the value of --input_format is not NHWC, --input_format does not take effect. Because if AIPP is enabled during tuning, the data format of the input node connected to AIPP must be NHWC during inference.
- If --insert_op_conf is configured at the same time, --input_format can only be set to NCHW or NHWC.
Suggestions and Benefits
None
Examples
--input_format=NCHW
Dependencies and Restrictions
None
Parent topic: Basic Functionality