Struct tfdeploy::Model
[−]
[src]
pub struct Model { /* fields omitted */ }
Model is Tfdeploy workhouse. It wraps a protobuf tensorflow model, and runs the inference interpreter.
Methods
impl Model
[src]
pub fn new(graph: GraphDef) -> Result<Model>
[src]
pub fn node_id_by_name(&self, name: &str) -> Result<usize>
[src]
pub fn state(&self) -> ModelState
[src]
pub fn for_path<P: AsRef<Path>>(p: P) -> Result<Model>
[src]
Load a Tensorflow protobul model from a file.
pub fn for_reader<R: Read>(r: R) -> Result<Model>
[src]
Load a Tfdeploy model from a reader.
pub fn graphdef_for_reader<R: Read>(r: R) -> Result<GraphDef>
[src]
Load a Tensorflow protobuf graph def from a reader.
pub fn graphdef_for_path<P: AsRef<Path>>(p: P) -> Result<GraphDef>
[src]
Load a Tensorflow protobuf graph def from a path
pub fn node_names(&self) -> Vec<&str>
[src]
pub fn get_node(&self, name: &str) -> Result<&Node>
[src]
Build a tfdeploy Node by name.
pub fn plan_for_one(&self, node: usize) -> Result<Plan>
[src]
pub fn run(
&self,
inputs: Vec<(usize, Matrix)>,
output: usize
) -> Result<Vec<Matrix>>
[src]
&self,
inputs: Vec<(usize, Matrix)>,
output: usize
) -> Result<Vec<Matrix>>
pub fn nodes(&self) -> &[Node]
[src]
pub fn run_with_names(
&self,
inputs: Vec<(&str, Matrix)>,
output: &str
) -> Result<Vec<Matrix>>
[src]
&self,
inputs: Vec<(&str, Matrix)>,
output: &str
) -> Result<Vec<Matrix>>