Trait burn::tensor::ReshapeArgs

pub trait ReshapeArgs<const D2: usize> {
    // Required method
    fn into_shape<B, const D: usize, K>(
        self,
        tensor: &Tensor<B, D, K>,
    ) -> Shape<D2>
       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<D2>
where B: Backend, K: BasicOps<B>,

Converts to a shape.

Object Safety§

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<D2>
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<D2>
where B: Backend, K: BasicOps<B>,

Implementors§

§

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