Enum FloatTensor

Source
pub enum FloatTensor {
    GGUFFloatTensor(GGUFFloatTensor),
    Float32Tensor(Float32Tensor),
}

Variants§

§

GGUFFloatTensor(GGUFFloatTensor)

§

Float32Tensor(Float32Tensor)

Trait Implementations§

Source§

impl<'a> Add<&'a f32> for &'a FloatTensor

Source§

type Output = Result<FloatTensor, Error>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &f32) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add for &'a FloatTensor

Source§

type Output = Result<FloatTensor, Error>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
Source§

impl BaseTensorOps for FloatTensor

Source§

type Item = f32

Source§

fn shape(&self) -> &Vec<u64>

Source§

fn reshape(&self, shape: Vec<i64>) -> Result<Self>

Source§

fn from_values(shape: Vec<u64>, values: Vec<Self::Item>) -> Result<Self>

Source§

fn resolve_dim(&self, dim: i64) -> Result<u64, Error>

Source§

fn resolve_shape(&self, shape2: Vec<i64>) -> Result<Vec<u64>, Error>

Source§

fn zeros(shape: Vec<u64>) -> Result<Self, Error>
where Self: Sized, Self::Item: ConstZero,

Source§

fn ones(shape: Vec<u64>) -> Result<Self, Error>
where Self: Sized, Self::Item: ConstOne,

Source§

fn of(shape: Vec<u64>, v: Self::Item) -> Result<Self, Error>
where Self: Sized,

Source§

fn rand(shape: Vec<u64>, rng: &mut impl Rng) -> Result<Self, Error>
where Self: Sized,

Source§

impl<'a> Div<&'a f32> for &'a FloatTensor

Source§

type Output = Result<FloatTensor, Error>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &f32) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a> Div for &'a FloatTensor

Source§

type Output = Result<FloatTensor, Error>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a> Mul<&'a f32> for &'a FloatTensor

Source§

type Output = Result<FloatTensor, Error>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &f32) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul for &'a FloatTensor

Source§

type Output = Result<FloatTensor, Error>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Neg for &'a FloatTensor

Source§

type Output = Result<FloatTensor, Error>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<'a> Sub<&'a f32> for &'a FloatTensor

Source§

type Output = Result<FloatTensor, Error>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &f32) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a> Sub for &'a FloatTensor

Source§

type Output = Result<FloatTensor, Error>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &FloatTensor) -> Self::Output

Performs the - operation. Read more
Source§

impl TensorOps<FloatTensor, f32> for FloatTensor

Source§

fn sum(&self, dim: i64) -> Result<FloatTensor>

Source§

fn item(&self) -> Result<Vec<Self::Item>>

Source§

fn size(&self) -> Result<usize>

Source§

fn apply(&self, f: impl Fn(Self::Item) -> Self::Item) -> Result<FloatTensor>

Source§

fn apply_xy( &self, rhs: &FloatTensor, f: impl Fn(Self::Item, Self::Item) -> Self::Item, ) -> Result<FloatTensor>

Source§

fn matmul(&self, rhs: &FloatTensor) -> Result<FloatTensor>

Source§

fn max(&self) -> Result<I, Error>
where I: PartialOrd + FloatCore,

Source§

fn log(&self, i: I) -> Result<T, Error>
where I: Real,

Source§

fn ln(&self) -> Result<T, Error>
where I: Real,

Source§

fn add(&self, rhs: &T) -> Result<T, Error>

Source§

fn add_item(&self, rhs: &Self::Item) -> Result<T, Error>

Source§

fn sub(&self, rhs: &T) -> Result<T, Error>

Source§

fn sub_item(&self, rhs: &Self::Item) -> Result<T, Error>

Source§

fn mul(&self, rhs: &T) -> Result<T, Error>

Source§

fn mul_item(&self, rhs: &Self::Item) -> Result<T, Error>

Source§

fn div_item(&self, rhs: &Self::Item) -> Result<T, Error>

Source§

fn div(&self, rhs: &T) -> Result<T, Error>

Source§

fn dim(&self, dim: i64) -> Result<u64, Error>

Source§

fn sqrt(&self) -> Result<T, Error>
where I: Real,

Source§

fn tanh(&self) -> Result<T, Error>
where I: Real,

Source§

fn neg(&self) -> Result<T, Error>
where I: Neg<Output = I>,

Source§

fn exp(&self) -> Result<T, Error>
where I: Real,

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V