[][src]Struct menoh::Model

pub struct Model { /* fields omitted */ }

Model, which executes computation.

Methods

impl Model
[src]

pub fn get_variable_dims(&self, name: &str) -> Result<Vec<usize>, Error>
[src]

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]

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]

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]

Trait Implementations

impl Drop for Model
[src]

Auto Trait Implementations

impl !Send for Model

impl !Sync for Model

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.