--om
Applicable Products
All processors
Description
Sets the directory (including the file name) of the offline model (.om), original model (.prototxt for Caffe or .pb for TensorFlow), or GE-dumped graph structure file (.txt) to be converted.
See Also
- If --mode is set to 1:
- To convert an offline model into a JSON file:
- To convert an original model file into a JSON file:
Use --om together with --mode (set to 1) , --json, and --framework.
- If --mode is set to 5:
To convert a GE-dumped graph structure file into a JSON file, use --om together with --mode (set to 5) and --json.
- If --mode is set to 6:
To display model details of an existing offline model, use --om with --mode.
Arguments
Argument: directory (including the file name) of the offline model (.om), original model (.prototxt for Caffe or .pb for TensorFlow), or GE-dumped graph structure file (.txt) to be converted.
Format: The directory (including the file name) can contain letters, digits, underscores (_), hyphens (-), periods (.), and Chinese characters.
Suggestions and Benefits
None
Example
- If --mode is set to 1:
- 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 an offline model into a JSON file:
- If --mode is set to 5:
atc --mode=5 --om=$HOME/module/ge_proto_00000000_PreRunBegin.txt --json=$HOME/module/out/ge_proto.json
- If --mode is set to 6:
atc --mode=6 --om=$HOME/module/out/tf_resnet50.om
Dependencies and Restrictions
None