Struct caffe2_operator::SimpleRefCountNet
source · pub struct SimpleRefCountNet { /* private fields */ }
Expand description
| SimpleRefcountNet is an implementation | that adds an additional abstraction | on top of SimpleRefCountNet: it tracks | all the tensors and for those that are | considered internal/temporary, delete | them once their refcount go to zero. | | In the context of a simple static run, | this can be carried out during construction | time: we will do a pass through the network | and track what blobs we need to do reset | on, after the execution of every op. | | To identify which blob is considered | temporary, we employ the following | strategy: any blob that is | | (1) consumed but not produced by ops | in the net, or | | (2) produced but not consumed by ops | in the net, or | | (3) is marked as external_output in | the protobuf will NOT be considered | temporary. | | In the long run, we should design proper | functional interfaces so that nets | are less imperative and more functional. | | Also, for now, SimpleRefCountNet should | only be used for benchmarking purposes | and not product use, since it is not going | to provide better performance gain, | and is implicitly incompatible with | the contract that earlier Nets expose | - that all intermediate blobs are visible | to the users. |
Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SimpleRefCountNet
impl !Send for SimpleRefCountNet
impl !Sync for SimpleRefCountNet
impl Unpin for SimpleRefCountNet
impl !UnwindSafe for SimpleRefCountNet
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>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.