Struct caffe2_operator::NetBase
source · pub struct NetBase { /* private fields */ }
Expand description
| Net is a thin struct that owns all the | operators together with the operator | contexts. |
Implementations§
source§impl NetBase
impl NetBase
pub fn events(&self) -> &Vec<*const Event>
pub fn external_output(&self) -> &Vec<String>
pub fn external_input(&self) -> &Vec<String>
pub fn name(&self) -> &String
pub fn debug_def(&self) -> &NetDef
pub fn has_debug_def(&self) -> bool
pub fn do_run_async(&mut self) -> bool
pub fn handle_run_error(&mut self) -> bool
pub fn wait(&mut self)
pub fn run(&mut self) -> bool
pub fn new(def: &Arc<NetDef>, unused: *mut Workspace) -> Self
pub fn run_async(&mut self) -> bool
pub fn cancel(&mut self)
sourcepub fn test_benchmark_one_run(&mut self) -> f32
pub fn test_benchmark_one_run(&mut self) -> f32
| Benchmarks a network for one individual | run so that we can feed new inputs on additional | calls. | | This function returns the number of | microseconds spent during the benchmark | | benchmark an individual run so that | we can FeedBlobs with new inputs no warmup | return time taken in microseconds |
sourcepub fn test_benchmark(
&mut self,
warmup_runs: i32,
main_runs: i32,
run_individual: bool
) -> Vec<f32>
pub fn test_benchmark( &mut self, warmup_runs: i32, main_runs: i32, run_individual: bool ) -> Vec<f32>
| Benchmarks a network. | | This function returns a vector of float | recording the number of milli- seconds | spent during the benchmark. | | The 0-th item is the time spent per each | network run, and if a net instantiation | supports run_individual, the remainder | of the vector returns the number of milliseconds | spent per operator. |
Auto Trait Implementations§
impl RefUnwindSafe for NetBase
impl !Send for NetBase
impl !Sync for NetBase
impl Unpin for NetBase
impl UnwindSafe for NetBase
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.