Trait BaseTensorOps
Source pub trait BaseTensorOps{
type Item;
// Required methods
fn shape(&self) -> &Vec<u64>;
fn reshape(&self, shape: Vec<i64>) -> Result<Self>
where Self: Sized;
fn from_values(shape: Vec<u64>, values: Vec<Self::Item>) -> Result<Self>
where Self: Sized;
// Provided methods
fn resolve_dim(&self, dim: i64) -> Result<u64> { ... }
fn resolve_shape(&self, shape2: Vec<i64>) -> Result<Vec<u64>> { ... }
fn zeros(shape: Vec<u64>) -> Result<Self>
where Self: Sized,
Self::Item: ConstZero { ... }
fn ones(shape: Vec<u64>) -> Result<Self>
where Self: Sized,
Self::Item: ConstOne { ... }
fn of(shape: Vec<u64>, v: Self::Item) -> Result<Self>
where Self: Sized { ... }
fn rand(shape: Vec<u64>, rng: &mut impl Rng) -> Result<Self>
where Self: Sized { ... }
}