Back to Onnxruntime

ORT Format File

js/web/lib/onnxjs/ort-schema/flatbuffers/README.md

1.25.11.1 KB
Original Source

ORT Format File

This directory contains the generated ts file necessary to support the ORT file format. The file is generated from the ORT file format schema. Please do not directly modify the generated ts header file.

The ORT file format schema uses FlatBuffers serialization library. To update its generated ts file,

  1. Download or locate the ort.fbs file.
  2. Download FlatBuffers compiler: Download the latest flatc tool (Windows.flatc.binary.zip) from Flatbuffers Release Page. Unzip and run

> flatc.exe --ts ort.fbs

copy the generated folder onnxruntime to js/web/lib/onnxjs/ort-schema/flatbuffers/ directory.

Update ort-generated.ts to re-export from the generated file fbs.ts under the onnxruntime directory.