pub struct Interpreter { /* private fields */ }
Expand description
The core structure for making inferences with TFLite
let mut int = Interpreter::new(model, device)?;
int.invoke()?;
Implementations§
Source§impl Interpreter
impl Interpreter
Sourcepub fn new(model: Model, dev: CoralDevice) -> Result<Self, Error>
pub fn new(model: Model, dev: CoralDevice) -> Result<Self, Error>
Create a new Interpreter and allocate tensors for a given Model
Sourcepub fn input_tensor<T: InnerTensorData>(&self, id: u32) -> Tensor<Input, T>
pub fn input_tensor<T: InnerTensorData>(&self, id: u32) -> Tensor<Input, T>
Get an input tensor
Sourcepub fn output_tensor<T: InnerTensorData>(&self, id: u32) -> Tensor<Output, T>
pub fn output_tensor<T: InnerTensorData>(&self, id: u32) -> Tensor<Output, T>
Get an output tensor
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Interpreter
impl RefUnwindSafe for Interpreter
impl !Send for Interpreter
impl !Sync for Interpreter
impl Unpin for Interpreter
impl UnwindSafe for Interpreter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more