burn::tensor

Trait ReshapeArgs

pub trait ReshapeArgs<const D2: usize> {
    // Required method
    fn into_shape<B, const D: usize, K>(self, tensor: &Tensor<B, D, K>) -> Shape
       where B: Backend,
             K: BasicOps<B>;
}
Expand description

Trait used for reshape arguments.

Required Methods§

fn into_shape<B, const D: usize, K>(self, tensor: &Tensor<B, D, K>) -> Shape
where B: Backend, K: BasicOps<B>,

Converts to a shape.

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.

Implementations on Foreign Types§

§

impl<const D2: usize> ReshapeArgs<D2> for [i32; D2]

§

fn into_shape<B, const D: usize, K>(self, tensor: &Tensor<B, D, K>) -> Shape
where B: Backend, K: BasicOps<B>,

§

impl<const D2: usize> ReshapeArgs<D2> for [usize; D2]

§

fn into_shape<B, const D: usize, K>(self, tensor: &Tensor<B, D, K>) -> Shape
where B: Backend, K: BasicOps<B>,

Implementors§

§

impl<const D2: usize> ReshapeArgs<D2> for Shape