Tiny, no-nonsense, self contained, portable inference.
use tract_core::prelude::*;
let tf = tract_tensorflow::tensorflow();
let model = tf.model_for_path("tests/models/plus3.pb").unwrap();
let plan = SimplePlan::new(&model).unwrap();
let input = tensor1(&[1.0f32, 2.5, 5.0]);
let mut outputs = plan.run(tvec![input]).unwrap();
let mut tensor = outputs.pop().unwrap();
assert_eq!(tensor, rctensor1(&[4.0f32, 5.5, 8.0]));
model | |
ops | |
tensor | |
tfpb | Generated protobuf codec for TensorFlow models, plus a handful of helper for
writting tests.
|