Trait Init

Source
pub trait Init {
    // Required method
    fn new_tensor<T: Type>(
        &self,
        shape: impl Shape,
        dtype: T,
        device: impl AsDevice,
    ) -> Tensor;
}

Required Methods§

Source

fn new_tensor<T: Type>( &self, shape: impl Shape, dtype: T, device: impl AsDevice, ) -> Tensor

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§