pub enum Op {
Show 34 variants
Binary(Tensor, Tensor, BinaryOp),
Unary(Tensor, UnaryOp),
Cmp(Tensor, CmpOp),
Reduce(Tensor, ReduceOp, Vec<usize>),
Matmul(Tensor, Tensor),
Gather(Tensor, Tensor, usize),
ScatterAdd(Tensor, Tensor, Tensor, usize),
IndexSelect(Tensor, Tensor, usize),
IndexAdd(Tensor, Tensor, Tensor, usize),
WhereCond(Tensor, Tensor, Tensor),
Conv1D {
arg: Tensor,
kernel: Tensor,
padding: usize,
stride: usize,
dilation: usize,
},
ConvTranspose1D {
arg: Tensor,
kernel: Tensor,
padding: usize,
output_padding: usize,
stride: usize,
dilation: usize,
},
Conv2D {
arg: Tensor,
kernel: Tensor,
padding: usize,
stride: usize,
dilation: usize,
},
ConvTranspose2D {
arg: Tensor,
kernel: Tensor,
padding: usize,
output_padding: usize,
stride: usize,
dilation: usize,
},
AvgPool2D {
arg: Tensor,
kernel_size: (usize, usize),
stride: (usize, usize),
},
MaxPool2D {
arg: Tensor,
kernel_size: (usize, usize),
stride: (usize, usize),
},
UpsampleNearest1D {
arg: Tensor,
target_size: usize,
},
UpsampleNearest2D {
arg: Tensor,
target_h: usize,
target_w: usize,
},
Cat(Vec<Tensor>, usize),
Affine {
arg: Tensor,
mul: f64,
add: f64,
},
ToDType(Tensor),
Copy(Tensor),
Broadcast(Tensor),
Narrow(Tensor, usize, usize, usize),
SliceScatter0(Tensor, Tensor, usize),
Reshape(Tensor),
ToDevice(Tensor),
Transpose(Tensor, usize, usize),
Permute(Tensor, Vec<usize>),
Elu(Tensor, f64),
Powf(Tensor, f64),
CustomOp1(Tensor, Arc<Box<dyn CustomOp1 + Send + Sync>>),
CustomOp2(Tensor, Tensor, Arc<Box<dyn CustomOp2 + Send + Sync>>),
CustomOp3(Tensor, Tensor, Tensor, Arc<Box<dyn CustomOp3 + Send + Sync>>),
}
Variants§
Binary(Tensor, Tensor, BinaryOp)
Unary(Tensor, UnaryOp)
Cmp(Tensor, CmpOp)
Reduce(Tensor, ReduceOp, Vec<usize>)
Matmul(Tensor, Tensor)
Gather(Tensor, Tensor, usize)
ScatterAdd(Tensor, Tensor, Tensor, usize)
IndexSelect(Tensor, Tensor, usize)
IndexAdd(Tensor, Tensor, Tensor, usize)
WhereCond(Tensor, Tensor, Tensor)
Conv1D
ConvTranspose1D
Fields
Conv2D
ConvTranspose2D
Fields
AvgPool2D
MaxPool2D
UpsampleNearest1D
UpsampleNearest2D
Cat(Vec<Tensor>, usize)
Affine
ToDType(Tensor)
Copy(Tensor)
Broadcast(Tensor)
Narrow(Tensor, usize, usize, usize)
SliceScatter0(Tensor, Tensor, usize)
Reshape(Tensor)
ToDevice(Tensor)
Transpose(Tensor, usize, usize)
Permute(Tensor, Vec<usize>)
Elu(Tensor, f64)
Powf(Tensor, f64)
CustomOp1(Tensor, Arc<Box<dyn CustomOp1 + Send + Sync>>)
CustomOp2(Tensor, Tensor, Arc<Box<dyn CustomOp2 + Send + Sync>>)
CustomOp3(Tensor, Tensor, Tensor, Arc<Box<dyn CustomOp3 + Send + Sync>>)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Op
impl !RefUnwindSafe for Op
impl Send for Op
impl Sync for Op
impl Unpin for Op
impl !UnwindSafe for Op
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more