Struct caffe2op_transpose::TransposeOp
source · pub struct TransposeOp<Context> { /* private fields */ }
Expand description
| Transpose the input tensor by permuting
| the axes of the input according to the
| axes
argument.
|
| Similar to numpy’s transpose
| function.
|
| For example, when axes=(1, 0, 2), given
| an input tensor of shape (1, 2, 3), the
| output shape will be (2, 1, 3).
|
| Github Links:
|
| - https://github.com/pytorch/pytorch/blob/master/caffe2/operators/transpose_op.cc
|
Implementations§
source§impl<Context> TransposeOp<Context>
impl<Context> TransposeOp<Context>
pub fn new<Args>(args: Args) -> Self
pub fn run_on_device(&mut self) -> bool
pub fn transpose_impl<T>(&mut self, x: &Tensor, y: *mut Tensor)
pub fn do_run_with_type<T>(&mut self) -> bool
Auto Trait Implementations§
impl<Context> !RefUnwindSafe for TransposeOp<Context>
impl<Context> !Send for TransposeOp<Context>
impl<Context> !Sync for TransposeOp<Context>
impl<Context> Unpin for TransposeOp<Context>where Context: Unpin,
impl<Context> !UnwindSafe for TransposeOp<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.