Trait ToBurn

Source
pub trait ToBurn<B: Backend, const D: usize, T: TensorKind<B>> {
    // Required methods
    fn to_burn(&self, device: &B::Device) -> Tensor<B, D, T>;
    fn into_burn(self, device: &B::Device) -> Tensor<B, D, T>;
}
Expand description

Trait for converting ndarray to burn tensor (generic over Float/Int and dimensionality)

Required Methods§

Source

fn to_burn(&self, device: &B::Device) -> Tensor<B, D, T>

Source

fn into_burn(self, device: &B::Device) -> Tensor<B, D, T>

Implementations on Foreign Types§

Source§

impl<B: Backend> ToBurn<B, 1, Float> for Array1<f32>

Trait implementation for 1D Float ndarray

Source§

fn to_burn(&self, device: &B::Device) -> Tensor<B, 1, Float>

Source§

fn into_burn(self, device: &B::Device) -> Tensor<B, 1, Float>

Source§

impl<B: Backend> ToBurn<B, 1, Int> for Array1<u32>

Trait implementation for 1D Int ndarray

Source§

fn to_burn(&self, device: &B::Device) -> Tensor<B, 1, Int>

Source§

fn into_burn(self, device: &B::Device) -> Tensor<B, 1, Int>

Source§

impl<B: Backend> ToBurn<B, 2, Float> for DMatrix<f32>

Implement ToBurn for converting nalgebra::DMatrix<f32> to a burn tensor (Float type)

Source§

fn to_burn(&self, device: &B::Device) -> Tensor<B, 2, Float>

Source§

fn into_burn(self, device: &B::Device) -> Tensor<B, 2, Float>

Source§

impl<B: Backend> ToBurn<B, 2, Float> for Array2<f32>

Implementation of the trait for 2D Float ndarray

Source§

fn to_burn(&self, device: &B::Device) -> Tensor<B, 2, Float>

Source§

fn into_burn(self, device: &B::Device) -> Tensor<B, 2, Float>

Source§

impl<B: Backend> ToBurn<B, 2, Int> for DMatrix<u32>

Implement ToBurn for converting nalgebra::DMatrix<u32> to a burn tensor (Int type)

Source§

fn to_burn(&self, device: &B::Device) -> Tensor<B, 2, Int>

Source§

fn into_burn(self, device: &B::Device) -> Tensor<B, 2, Int>

Source§

impl<B: Backend> ToBurn<B, 2, Int> for Array2<u32>

Trait implementation for 2D Int ndarray

Source§

fn to_burn(&self, device: &B::Device) -> Tensor<B, 2, Int>

Source§

fn into_burn(self, device: &B::Device) -> Tensor<B, 2, Int>

Source§

impl<B: Backend> ToBurn<B, 3, Float> for Array3<f32>

Source§

fn to_burn(&self, device: &B::Device) -> Tensor<B, 3, Float>

Source§

fn into_burn(self, device: &B::Device) -> Tensor<B, 3, Float>

Source§

impl<B: Backend> ToBurn<B, 3, Int> for Array3<u32>

Trait implementation for 3D Int ndarray

Source§

fn to_burn(&self, device: &B::Device) -> Tensor<B, 3, Int>

Source§

fn into_burn(self, device: &B::Device) -> Tensor<B, 3, Int>

Implementors§