Trait hotg_runicos_base_runtime::Model [−][src]
pub trait Model: Send + Sync + 'static {
unsafe fn infer(
&mut self,
inputs: &[&[Cell<u8>]],
outputs: &[&[Cell<u8>]]
) -> Result<(), Error>;
fn input_shapes(&self) -> &[Shape<'_>];
fn output_shapes(&self) -> &[Shape<'_>];
}
Required methods
Run inference on the input tensors, writing the results to outputs
.
Safety
Implementations can assume that they have unique access to outputs
(i.e. converting the &[Cell<u8>]
to &mut [u8]
is valid).
The inputs
parameter may be aliased.