Function ort::init_from

source ·
pub fn init_from(path: impl ToString) -> EnvironmentBuilder
Expand description

Creates an ONNX Runtime environment, dynamically loading ONNX Runtime from the library file (.dll/.so/.dylib) specified by path.

This must be called before any other ort APIs are used in order for the correct dynamic library to be loaded.

§Notes

  • In order for environment settings to apply, this must be called before you use other APIs like crate::Session, and you must call .commit() on the builder returned by this function.