Struct tensorflow::ImportGraphDefOptions
[−]
[src]
pub struct ImportGraphDefOptions { /* fields omitted */ }
ImportGraphDefOptions
holds options that can be passed to
Graph::import_graph_def
.
Methods
impl ImportGraphDefOptions
[src]
fn new() -> Self
Creates a default ImportGraphDefOptions.
impl ImportGraphDefOptions
[src]
fn set_prefix(&mut self, prefix: &str) -> Result<(), NulError>
Set the prefix to be prepended to the names of nodes in graph_def
that will
be imported into graph
.
fn add_input_mapping(
&mut self,
src_name: &str,
src_index: usize,
dst: &Output
) -> Result<(), NulError>
&mut self,
src_name: &str,
src_index: usize,
dst: &Output
) -> Result<(), NulError>
Set any imported nodes with input src_name:src_index
to have that input
replaced with dst
. src_name
refers to a node in the graph to be imported,
dst
references a node already existing in the graph being imported into.
fn remap_control_dependency(
&mut self,
src_name: &str,
dst: &Operation
) -> Result<(), NulError>
&mut self,
src_name: &str,
dst: &Operation
) -> Result<(), NulError>
Set any imported nodes with control input src_name
to have that input
replaced with dst
. src_name
refers to a node in the graph to be imported,
dst
references an operation already existing in the graph being imported
into.
fn add_control_dependency(&mut self, oper: &Operation)
Cause the imported graph to have a control dependency on oper
. oper
should exist in the graph being imported into.
fn add_return_output(
&mut self,
oper_name: &str,
index: usize
) -> Result<(), NulError>
&mut self,
oper_name: &str,
index: usize
) -> Result<(), NulError>
Add an output in graph_def
to be returned via the return_outputs
output
parameter of import_graph_def()
. If the output is remapped via an input
mapping, the corresponding existing tensor in graph
will be returned.
fn num_return_outputs(&self) -> usize
Returns the number of return outputs added via add_return_output()
.