Registry / other / tract-onnx

tract-onnx

JSON →
library0.23.1rscratesunverified

Tiny, no-nonsense, self contained, TensorFlow and ONNX inference.

# Cargo.toml [dependencies] tract-onnx = "0.23.1"
INSTALL
IMPORT
SIG · TRACT-ONNX
T
tract-onnx
otherrustv0.23.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

prelude
use tract_onnx::prelude::*;

Loads and runs an ONNX model for inference.

use tract_onnx::prelude::*; fn main() -> TractResult<()> { let model = onnx() .model_for_path("model.onnx")? .into_optimized()? .into_runnable()?; let result = model.run(tvec!(Tensor::from(1.0f32)))?; println!("Output: {:?}", result); Ok(()) }
Debug
Known issues
gotchaONNX opset compatibility: not all operators are supported; may fail on complex models.
fix
Check tract-onnx documentation for supported opsets and operators.
affects: >=0.23.0
Upgrade
Version history
0.23.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
tract-onnx — cargo add tract-onnx · libregistry