Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 1.52 KB

export_onnx.rst

File metadata and controls

50 lines (36 loc) · 1.52 KB

Export ONNX Callback

Running with this callback exports a trained model in ONNX format. The default ONNX filename is lbann.onnx. An optional debug string can also be printed to by setting debug string filename argument. These options can be controlled using the callback-arguments. The files are created in the LBANN run directory.

Execution Points

  • On train end

Callback Arguments

output_filename

(string, optional) Default value: lbann_output.onnx.

debug_string_filename

(string, optional) Name of debug string file. If not set, the debug string is not output.

Example Using Export ONNX Callback (Python Front-End)

# Pass parameters to callback
export_onnx = lbann.CallbackExportOnnx(
                output_filename="model.onnx",
                debug_string_filename="debug_onnx.txt")