Struct caffe2op_loadsave::LoadOp
source · pub struct LoadOp<Context> { /* private fields */ }
Expand description
| The Load operator loads a set of serialized
| blobs from a db or multiple dbs. It takes
| $[0, \infty)$ number of inputs and $[0,
| \infty)$ number of outputs, using the
| db keys to match the db entries with the
| outputs.
|
| If at least one input is passed, then
| it is assumed that that input blobs are
| a set of DBReaders to load from. Otherwise
| the db
or dbs
argument is used to
| load blobs from one single db or multiple
| dbs respectively. db_type
argument
| is used to specify the type of the input
| db/dbs.
|
| Github Links:
|
| - https://github.com/pytorch/pytorch/blob/master/caffe2/operators/load_save_op.cc
|
Implementations§
source§impl<Context> LoadOp<Context>
impl<Context> LoadOp<Context>
pub fn new(operator_def: &OperatorDef, ws: *mut Workspace) -> Self
pub fn run_on_device(&mut self) -> bool
pub fn extract( &mut self, db_id: i32, cursor: *mut dyn Cursor, blob_states: *mut HashMap<String, BlobState>, total_loaded_blobs: *mut i32 )
pub fn extract_all( &mut self, db_id: i32, cursor: *mut dyn Cursor, blob_states: *mut HashMap<String, BlobState>, total_loaded_blobs: *mut i32 )
pub fn extract_from( &mut self, db_id: i32, cursor: *mut dyn Cursor, outputs: &Vec<*mut Blob>, blob_states: *mut HashMap<String, BlobState>, total_loaded_blobs: *mut i32 )
source§impl LoadOp<CPUContext>
impl LoadOp<CPUContext>
pub fn set_current_device(&mut self, proto: *mut BlobProto)
source§impl LoadOp<CUDAContext>
impl LoadOp<CUDAContext>
pub fn set_current_device(&mut self, proto: *mut BlobProto)
Auto Trait Implementations§
impl<Context> !RefUnwindSafe for LoadOp<Context>
impl<Context> !Send for LoadOp<Context>
impl<Context> !Sync for LoadOp<Context>
impl<Context> Unpin for LoadOp<Context>where Context: Unpin,
impl<Context> !UnwindSafe for LoadOp<Context>
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.