pub enum FloatTensor {
GGUFFloatTensor(GGUFFloatTensor),
Float32Tensor(Float32Tensor),
}Variants§
GGUFFloatTensor(GGUFFloatTensor)
Float32Tensor(Float32Tensor)
Trait Implementations§
Source§impl<'a> Add<&'a f32> for &'a FloatTensor
impl<'a> Add<&'a f32> for &'a FloatTensor
Source§impl<'a> Add for &'a FloatTensor
impl<'a> Add for &'a FloatTensor
Source§impl BaseTensorOps for FloatTensor
impl BaseTensorOps for FloatTensor
type Item = f32
fn shape(&self) -> &Vec<u64>
fn reshape(&self, shape: Vec<i64>) -> Result<Self>
fn from_values(shape: Vec<u64>, values: Vec<Self::Item>) -> Result<Self>
fn resolve_dim(&self, dim: i64) -> Result<u64, Error>
fn resolve_shape(&self, shape2: Vec<i64>) -> Result<Vec<u64>, Error>
fn zeros(shape: Vec<u64>) -> Result<Self, Error>
fn ones(shape: Vec<u64>) -> Result<Self, Error>
fn of(shape: Vec<u64>, v: Self::Item) -> Result<Self, Error>where
Self: Sized,
fn rand(shape: Vec<u64>, rng: &mut impl Rng) -> Result<Self, Error>where
Self: Sized,
Source§impl<'a> Div<&'a f32> for &'a FloatTensor
impl<'a> Div<&'a f32> for &'a FloatTensor
Source§impl<'a> Div for &'a FloatTensor
impl<'a> Div for &'a FloatTensor
Source§impl<'a> Mul<&'a f32> for &'a FloatTensor
impl<'a> Mul<&'a f32> for &'a FloatTensor
Source§impl<'a> Mul for &'a FloatTensor
impl<'a> Mul for &'a FloatTensor
Source§impl<'a> Neg for &'a FloatTensor
impl<'a> Neg for &'a FloatTensor
Source§impl<'a> Sub<&'a f32> for &'a FloatTensor
impl<'a> Sub<&'a f32> for &'a FloatTensor
Source§impl<'a> Sub for &'a FloatTensor
impl<'a> Sub for &'a FloatTensor
Source§impl TensorOps<FloatTensor, f32> for FloatTensor
impl TensorOps<FloatTensor, f32> for FloatTensor
fn sum(&self, dim: i64) -> Result<FloatTensor>
fn item(&self) -> Result<Vec<Self::Item>>
fn size(&self) -> Result<usize>
fn apply(&self, f: impl Fn(Self::Item) -> Self::Item) -> Result<FloatTensor>
fn apply_xy( &self, rhs: &FloatTensor, f: impl Fn(Self::Item, Self::Item) -> Self::Item, ) -> Result<FloatTensor>
fn matmul(&self, rhs: &FloatTensor) -> Result<FloatTensor>
fn max(&self) -> Result<I, Error>where
I: PartialOrd + FloatCore,
fn log(&self, i: I) -> Result<T, Error>where
I: Real,
fn ln(&self) -> Result<T, Error>where
I: Real,
fn add(&self, rhs: &T) -> Result<T, Error>
fn add_item(&self, rhs: &Self::Item) -> Result<T, Error>
fn sub(&self, rhs: &T) -> Result<T, Error>
fn sub_item(&self, rhs: &Self::Item) -> Result<T, Error>
fn mul(&self, rhs: &T) -> Result<T, Error>
fn mul_item(&self, rhs: &Self::Item) -> Result<T, Error>
fn div_item(&self, rhs: &Self::Item) -> Result<T, Error>
fn div(&self, rhs: &T) -> Result<T, Error>
fn dim(&self, dim: i64) -> Result<u64, Error>
fn sqrt(&self) -> Result<T, Error>where
I: Real,
fn tanh(&self) -> Result<T, Error>where
I: Real,
fn neg(&self) -> Result<T, Error>where
I: Neg<Output = I>,
fn exp(&self) -> Result<T, Error>where
I: Real,
Auto Trait Implementations§
impl Freeze for FloatTensor
impl !RefUnwindSafe for FloatTensor
impl Send for FloatTensor
impl Sync for FloatTensor
impl Unpin for FloatTensor
impl !UnwindSafe for FloatTensor
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