Struct caffe2op_sequence::AddPaddingOp
source · pub struct AddPaddingOp<Context> { /* private fields */ }
Expand description
| Given a partitioned tensor $T<N, D_1, | …, D_n>$, where the partitions are | defined as ranges on its outer-most | (slowest varying) dimension $N$, return | a tensor $T<(N + 2 * padding_width), | D_1, …, | | D_n>$ with paddings added to the start | and end of each range. | | Optionally, different paddings can | be provided for beginning and end. | | Paddings provided must be a tensor $T<D_1, | …, | | D_n>$. If no padding is provided, add | zero padding. If no lengths vector is | provided, add padding only once, at | the start and end of data. | | Github Links: | | - https://github.com/pytorch/pytorch/blob/master/caffe2/operators/sequence_ops.cc |
Implementations§
source§impl<Context> AddPaddingOp<Context>
impl<Context> AddPaddingOp<Context>
pub fn new<Args>(args: Args) -> Self
pub fn run_on_device(&mut self) -> bool
pub fn do_run_with_type<T>(&mut self) -> bool
Auto Trait Implementations§
impl<Context> !RefUnwindSafe for AddPaddingOp<Context>
impl<Context> !Send for AddPaddingOp<Context>
impl<Context> !Sync for AddPaddingOp<Context>
impl<Context> Unpin for AddPaddingOp<Context>where Context: Unpin,
impl<Context> !UnwindSafe for AddPaddingOp<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.