Struct caffe2_nomnigraph::NNModule
source · pub struct NNModule<T, U> { /* private fields */ }
Implementations§
source§impl<T, U> NNModule<T, U>
impl<T, U> NNModule<T, U>
sourcepub fn replace_subgraph_with_operator<Args>(
&mut self,
sg: &SubgraphType<T, U>,
subgraph_inputs: &Vec<NodeRef<T, U>>,
subgraph_outputs: &Vec<NodeRef<T, U>>,
args: Args
) -> NodeRef<T, U>
pub fn replace_subgraph_with_operator<Args>( &mut self, sg: &SubgraphType<T, U>, subgraph_inputs: &Vec<NodeRef<T, U>>, subgraph_outputs: &Vec<NodeRef<T, U>>, args: Args ) -> NodeRef<T, U>
| Simple wrapper of replaceSubgraph where | the node is created for you. | | Returns a NodeRef to the node containing | the operator that was created
pub fn create_unique_data_node(&mut self, s: Option<&str>) -> NodeRef<T, U>
sourcepub fn replace_subgraph(
&mut self,
subgraph: &NNSubgraph,
node: &NodeRef<T, U>,
node_inputs: &Vec<NodeRef<T, U>>,
node_outputs: &Vec<NodeRef<T, U>>
)
pub fn replace_subgraph( &mut self, subgraph: &NNSubgraph, node: &NodeRef<T, U>, node_inputs: &Vec<NodeRef<T, U>>, node_outputs: &Vec<NodeRef<T, U>> )
| Replace subgraph sg by node, using the | order of node_inputs and node_outputs | to determine how to link them to the node. | node_inputs must enumerate all the | inputs to the subgraph (NeuralNetData | that do not have producers inside the | subgraph). Same for node_outputs | | New output names may be created in the | case that an inputs and an output have | the same name (to avoid in place ops). | | This may cause issues with external_output | | – be sure to check after running this | function (and perhaps inserting a copy/alias | op). |
pub fn delete_subgraph(&mut self, subgraph: &NNSubgraph)
Auto Trait Implementations§
impl<T, U> !RefUnwindSafe for NNModule<T, U>
impl<T, U> !Send for NNModule<T, U>
impl<T, U> !Sync for NNModule<T, U>
impl<T, U> Unpin for NNModule<T, U>
impl<T, U> !UnwindSafe for NNModule<T, U>
Blanket Implementations§
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.