--om

Applicability

Product

Supported (Yes/No)

Atlas 350 Accelerator Card

√

Atlas A3 training product/Atlas A3 inference product

√

Atlas A2 training product/Atlas A2 inference product

√

Atlas 200I/500 A2 inference product

√

Atlas inference product

√

Atlas training product

√

Description

Sets the directory (including the file name) of your offline model (.om), original model (.prototxt for Caffe or .pb for TensorFlow), or GE dump graph (.txt) to be converted.

See Also

  • If --mode is set to 1:
    • To convert an offline model into a JSON file:

      Use --om in conjunction with --mode=1 and --json.

    • To convert an original model into a JSON file:

      Use --om in conjunction with --mode=1, --json, and --framework.

  • If --mode is set to 5:

    To convert a GE dump graph 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.

Argument

Argument: Directory (including the file name) of your offline model (.om), original model (.prototxt for Caffe or .pb for TensorFlow), or GE dump graph (.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 into a JSON file:
      atc --mode=1 --om=$HOME/module/resnet50_tensorflow.pb  --json=$HOME/module/out/tf_resnet50.json  --framework=3
  • 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