dump_to_file

Applicable Products

All processors

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.