Struct menoh::Model [−][src]
pub struct Model<'a, 's> { /* fields omitted */ }
Main struct running inference.
An instance of Model
is built by ModelBuilder
Lifetime of Model
instance is bounded by attached buffer internal data if user attached external buffer.
Methods
impl<'a, 's> Model<'a, 's>
[src]
impl<'a, 's> Model<'a, 's>
pub fn run(&mut self) -> Result<(), Error>
[src]
pub fn run(&mut self) -> Result<(), Error>
Run model inference
pub fn get_attached_buffer<T>(&self, name: &str) -> Result<Buffer<'a, T>, Error> where
T: DtypeCompatible,
[src]
pub fn get_attached_buffer<T>(&self, name: &str) -> Result<Buffer<'a, T>, Error> where
T: DtypeCompatible,
Get attached buffer.
Buffer lifetime is bounded by buffer internal data
pub fn get_internal_buffer<T>(&self, name: &str) -> Result<Buffer<T>, Error> where
T: DtypeCompatible,
[src]
pub fn get_internal_buffer<T>(&self, name: &str) -> Result<Buffer<T>, Error> where
T: DtypeCompatible,
Get reference to buffer generated inside model.
Buffer lifetime is bounded by this instance.
pub fn get_variable_dtype(&self, name: &str) -> Result<Dtype, Error>
[src]
pub fn get_variable_dtype(&self, name: &str) -> Result<Dtype, Error>
Get dtype by name
pub fn get_variable_dims(&self, name: &str) -> Result<Vec<i32>, Error>
[src]
pub fn get_variable_dims(&self, name: &str) -> Result<Vec<i32>, Error>
Get dims by name