Struct caffe2op_partition::PartitionOpBase
source · pub struct PartitionOpBase { /* private fields */ }
Expand description
| Splits the input int tensor into multiple | ones according to the first tensor. | | Takes the first input and partitions | it to shards according to the remainder | of values modulo the number of partitions. | It requires that the first tensor is | of integral type. The number of partitions | is derived as (num_output / num_input). | | If additional inputs are present they | must have the same shape as the first | input, optionally with extra trailing | dimensions. They will be partitioned | accordingly to the first input. | | Optional arg ‘pack_first_input’ transforms | the first tensor values as | | X_ij / num_partitions. | | Outputs are ordered as | | X_0_part_0, X_1_part_0, …, X_N-1_part_0, | X_0_part_1, …, X_N-1_part_K-1 |
Implementations§
source§impl PartitionOpBase
impl PartitionOpBase
pub fn new<Args>(args: Args) -> Self
pub fn apply_partition<Index>(&mut self, skip_first_argument: bool)
Auto Trait Implementations§
impl !RefUnwindSafe for PartitionOpBase
impl !Send for PartitionOpBase
impl !Sync for PartitionOpBase
impl Unpin for PartitionOpBase
impl !UnwindSafe for PartitionOpBase
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.