burn::tensor

Trait TensorKind

pub trait TensorKind<B>: Clone + Debug
where B: Backend,
{ type Primitive: TensorMetadata; // Required method fn name() -> &'static str; }
Expand description

A type-level representation of the kind of a tensor. Metadata access is lazy.

Required Associated Types§

type Primitive: TensorMetadata

The primitive type of the tensor.

Required Methods§

fn name() -> &'static str

The name of the tensor kind.

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§

§

impl<B> TensorKind<B> for Bool
where B: Backend,

§

impl<B> TensorKind<B> for Float
where B: Backend,

§

impl<B> TensorKind<B> for Int
where B: Backend,