Struct caffe2_common::NetMutator
source · pub struct NetMutator { /* private fields */ }
Expand description
Concise util class to mutate a net in a chaining fashion.
Implementations§
source§impl NetMutator
impl NetMutator
sourcepub fn add_argument<T>(&mut self, name: &String, value: &T) -> &mut NetMutator
pub fn add_argument<T>(&mut self, name: &String, value: &T) -> &mut NetMutator
Add argument to the last created op.
pub fn new(net: *mut NetDef) -> Self
source§impl NetMutator
impl NetMutator
pub fn new_op( &mut self, ty: &String, inputs: &Vec<String>, outputs: &Vec<String> ) -> &mut NetMutator
pub fn external_inputs( &mut self, external_inputs: &Vec<String> ) -> &mut NetMutator
pub fn external_outputs( &mut self, external_outputs: &Vec<String> ) -> &mut NetMutator
sourcepub fn set_device_option_name(&mut self, name: &String) -> &mut NetMutator
pub fn set_device_option_name(&mut self, name: &String) -> &mut NetMutator
Set device name for the last created op.
Auto Trait Implementations§
impl RefUnwindSafe for NetMutator
impl !Send for NetMutator
impl !Sync for NetMutator
impl Unpin for NetMutator
impl UnwindSafe for NetMutator
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.