Crate rten

source ·
Expand description

rten is a runtime for machine learning models.

RTen uses models that are exported from other frameworks such as PyTorch into ONNX format and then converted into the inference-optimized .rten format by the tools in this repository.

The basic workflow for loading and running a model is:

  1. Load the model using Model::load.
  2. Load the input data (images, audio, text etc.)
  3. Pre-process the input data to convert it into tensors in the format the model expects. For this you can use RTen’s own tensor types (see rten-tensor) and pre-processing libraries, or popular Rust crates such as ndarray.
  4. Execute the model using Model::run (or one of the other run_ methods)
  5. Post-process the results to convert them into meaningful outputs.

See the example projects in rten-examples to see how all these pieces fit together.

Re-exports

Modules

  • Connectionist Temporal Classification (CTC) sequence decoding tools.
  • The ops module exposes the various operators available for machine-learning models.

Macros

Structs

  • The central type used to execute RTen machine learning models.
  • Provides access to metadata about a graph node.
  • Registry used to instantiate operators when loading a model file.
  • Options that control logging and other behaviors when executing a Model.

Enums

  • Represents the size of a dimension of a runtime-provided value, such as an operator input, output or intermediate value.
  • Errors reported by Model::load.
  • Specifies sort order for graph run timings.

Traits

Type Aliases