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:
- Load the model using Model::load.
- Load the input data (images, audio, text etc.)
- 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.
- Execute the model using Model::run (or one of the other
run_methods) - 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
pub use ops::FloatOperators;pub use ops::Input;pub use ops::Operators;pub use ops::Output;pub use timer::Timer;
Modules
- Connectionist Temporal Classification (CTC) sequence decoding tools.
- The
opsmodule 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
- Trait that that creates the default/built-in implementation of an operator, for use with OpRegistry::register_op.
Type Aliases
- ID of a node in a Model graph.