pub enum Operation<T: Float> {
Add {
a: Tensor<T>,
b: Tensor<T>,
},
Multiply {
a: Tensor<T>,
b: Tensor<T>,
},
MatMul {
a: Tensor<T>,
b: Tensor<T>,
},
Conv2D {
input: Tensor<T>,
kernel: Tensor<T>,
stride: (usize, usize),
padding: (usize, usize),
},
Reduce {
input: Tensor<T>,
operation: ReduceOp,
axes: Option<Vec<usize>>,
},
}Expand description
Generic operation type for backend execution バックエンド実行用の汎用操作型
Variants§
Add
Element-wise addition 要素ごとの加算
Multiply
Element-wise multiplication 要素ごとの乗算
MatMul
Matrix multiplication 行列乗算
Conv2D
Convolution operation 畳み込み操作
Fields
Reduce
Reduction operations (sum, mean, etc.) リダクション操作(sum、meanなど)
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Operation<T>
impl<T> RefUnwindSafe for Operation<T>where
T: RefUnwindSafe,
impl<T> Send for Operation<T>where
T: Send,
impl<T> Sync for Operation<T>where
T: Sync,
impl<T> Unpin for Operation<T>
impl<T> UnwindSafe for Operation<T>where
T: RefUnwindSafe,
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§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