Struct caffe2_opt::BackendTransformerBase
source · pub struct BackendTransformerBase { /* private fields */ }
Expand description
| This class contains some common functions | for backend lowering and graph cutting |
Implementations§
source§impl BackendTransformerBase
impl BackendTransformerBase
pub fn input_mapping(&self) -> &HashMap<String, String>
pub fn reverse_input_mapping(&self) -> &HashMap<String, String>
sourcepub fn ssa_rewrite_and_map_names(
&mut self,
ws: *mut Workspace,
pred_net: *mut NetDef,
input_shape_hints: &ShapeInfoMap
) -> ShapeInfoMap
pub fn ssa_rewrite_and_map_names( &mut self, ws: *mut Workspace, pred_net: *mut NetDef, input_shape_hints: &ShapeInfoMap ) -> ShapeInfoMap
| SSA rewrite the net and return name mapping |
sourcepub fn infer_shapes(
&mut self,
ws: *mut Workspace,
pred_net: *mut NetDef,
shape_hints_mapped: &ShapeInfoMap,
spec: &BoundShapeSpec
) -> ShapeInfoMap
pub fn infer_shapes( &mut self, ws: *mut Workspace, pred_net: *mut NetDef, shape_hints_mapped: &ShapeInfoMap, spec: &BoundShapeSpec ) -> ShapeInfoMap
| Do bound shape inference and collect | shape infos |
sourcepub fn add_shape_to_net(
&self,
shape_net: &mut NetDef,
shape_hints: &ShapeInfoMap
)
pub fn add_shape_to_net( &self, shape_net: &mut NetDef, shape_hints: &ShapeInfoMap )
add shape info to the net
sourcepub fn dump_net(
&self,
pred_net: &NetDef,
shape_hints: &ShapeInfoMap,
fname: &String
)
pub fn dump_net( &self, pred_net: &NetDef, shape_hints: &ShapeInfoMap, fname: &String )
Dump the net with shape info
sourcepub fn get_model_id(net: &NetDef) -> String
pub fn get_model_id(net: &NetDef) -> String
Get model ID from the NetDef
sourcepub fn annotate_op_index(net: *mut NetDef)
pub fn annotate_op_index(net: *mut NetDef)
| Populate ‘net_pos’ argument for any ops | that don’t already have it. ‘net_pos’ we | populate here starts after the max | ‘net_pos’ value we encountered.
Auto Trait Implementations§
impl RefUnwindSafe for BackendTransformerBase
impl Send for BackendTransformerBase
impl Sync for BackendTransformerBase
impl Unpin for BackendTransformerBase
impl UnwindSafe for BackendTransformerBase
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.