rten_model_file/lib.rs
1//! Low-level crate for parsing `.rten`-format machine learning model files.
2//!
3//! # About .rten model files
4//!
5//! RTen model files contain both the model graph and tensor data. The model
6//! graph is in [FlatBuffers](https://flatbuffers.dev) format and closely
7//! follows the [ONNX](https://onnx.ai/onnx/) specification. Tensor data is
8//! stored following the model graph.
9//!
10//! See [this document](https://github.com/robertknight/rten/blob/main/docs/rten-file-format.md)
11//! for more details of the format and the rationale for its design.
12
13/// Schema for the model graph, generated using the FlatBuffers compiler.
14///
15/// See `schema.fbs` for the FlatBuffers source.
16#[allow(
17 clippy::all,
18 dead_code,
19 unused_imports,
20 mismatched_lifetime_syntaxes,
21 unsafe_op_in_unsafe_fn
22)]
23pub mod schema_generated;
24
25/// Parse the header of a .rten model file.
26pub mod header;
27
28pub use schema_generated as schema;