mirror of
https://github.com/huggingface/candle.git
synced 2025-06-20 04:00:28 +00:00
Add a couple operators.
This commit is contained in:
@ -2,13 +2,17 @@ use crate::Tensor;
|
||||
|
||||
pub(crate) enum Op {
|
||||
Add(Tensor, Tensor),
|
||||
Mul(Tensor, Tensor),
|
||||
Sub(Tensor, Tensor),
|
||||
Div(Tensor, Tensor),
|
||||
|
||||
#[allow(dead_code)] // add is currently unused.
|
||||
Affine {
|
||||
arg: Tensor,
|
||||
mul: f64,
|
||||
add: f64,
|
||||
},
|
||||
Mul(Tensor, Tensor),
|
||||
Neg(Tensor),
|
||||
Sqr(Tensor),
|
||||
Sqrt(Tensor),
|
||||
// TODO: Support for custom ops.
|
||||
|
Reference in New Issue
Block a user