dump_to_file

Applicability

Product

Supported

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

Function Usage

Exports a graph to a file.

Prototype

1
dump_to_file(format: DumpFormat = DumpFormat.kReadable, suffix: str = "") -> None

Parameters

Parameter

Input/Output

Description

format

Input

Export format. The default value is kReadable. For details, see DumpFormat.

suffix

Input

File name extension, which is of the string type. The default value is an empty string.

Returns

None

Restrictions

  • If format is not a valid dump format, TypeError is thrown.
  • If suffix is not a string, TypeError is thrown.
  • If the export fails, RuntimeError is thrown.
  • The exported .pbtxt file contains only the graph structure and does not contain weight data or other attributes.