Struct menoh::Model [−][src]
pub struct Model { /* fields omitted */ }
Model, which executes computation.
Methods
impl Model
[src]
impl Model
pub fn get_variable_dims(&self, name: &str) -> Result<Vec<usize>, Error>
[src]
pub fn get_variable_dims(&self, name: &str) -> Result<Vec<usize>, Error>
Fetch the shape of a variable.
let dims = model.get_variable_dims("fc2")?;
pub fn get_variable<T>(&self, name: &str) -> Result<(Vec<usize>, &[T]), Error> where
T: Dtype,
[src]
pub fn get_variable<T>(&self, name: &str) -> Result<(Vec<usize>, &[T]), Error> where
T: Dtype,
Fetch the shape and read-only view of a variable.
let (dims, buf) = model.get_variable::<f32>("fc2")?;
pub fn get_variable_mut<T>(
&mut self,
name: &str
) -> Result<(Vec<usize>, &mut [T]), Error> where
T: Dtype,
[src]
pub fn get_variable_mut<T>(
&mut self,
name: &str
) -> Result<(Vec<usize>, &mut [T]), Error> where
T: Dtype,
Fetch the shape and read/write view of a variable.
let (dims, buf) = model.get_variable_mut::<f32>("fc2")?;
pub fn run(&mut self) -> Result<(), Error>
[src]
pub fn run(&mut self) -> Result<(), Error>