--json
Applicable Products
All processors
Description
Sets the directory (including the file name) of the JSON file converted from an offline model, an original model file, or a dumped GE graph structure file.
The JSON file converted from an offline model also records the base version information, such as the ATC software version and OPP operator package version, along with the ATC commands used during model conversion.
See Also
- To convert an offline model into a JSON file:
- To convert an original model file into a JSON file:
Use this option together with --mode (set to 1), --om, and --framework.
If the original model uses the MindSpore framework, that is, --framework is set to 1, conversion to JSON files is not supported.
- To convert a GE-dumped graph structure file into a JSON file:
Use this option together with --mode (set to 5) and --om.
Only the dumped ge_proto*.txt file can be converted into a JSON file.
Arguments
Argument: Directory (including the file name) of the JSON file.
Format: The directory (including the file name) can contain letters, digits, underscores (_), hyphens (-), periods (.), and Chinese characters.
Suggestions and Benefits
None
Example
- To convert an offline model into a JSON file:
atc --mode=1 --om=$HOME/module/out/tf_resnet50.om --json=$HOME/module/out/tf_resnet50.json
- To convert an original model file into a JSON file:
atc --mode=1 --om=$HOME/module/resnet50_tensorflow.pb --json=$HOME/module/out/tf_resnet50.json --framework=3
- To convert a GE-dumped graph structure file into a JSON file:
atc --mode=5 --om=$HOME/module/ge_proto_00000000_PreRunBegin.txt --json=$HOME/module/out/ge_proto.json
Dependencies and Restrictions
None