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§
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
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.