ferrite

Trait TensorCreation

Source
pub trait TensorCreation {
    // Required methods
    fn zeros(shape: Vec<usize>, requires_grad: Option<bool>) -> Self;
    fn ones(shape: Vec<usize>, requires_grad: Option<bool>) -> Self;
    fn from_ndarray<S, D, T>(
        data: &ArrayBase<S, D>,
        requires_grad: Option<bool>,
    ) -> Self
       where S: Data<Elem = T>,
             T: AsPrimitive<f32>,
             D: Dimension;
}

Required Methods§

Source

fn zeros(shape: Vec<usize>, requires_grad: Option<bool>) -> Self

Source

fn ones(shape: Vec<usize>, requires_grad: Option<bool>) -> Self

Source

fn from_ndarray<S, D, T>( data: &ArrayBase<S, D>, requires_grad: Option<bool>, ) -> Self
where S: Data<Elem = T>, T: AsPrimitive<f32>, D: Dimension,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§