Expand description
This library provides multiple tensor implementations hidden behind an easy to use API that supports reverse mode automatic differentiation.
Modules§
- activation
- The activation module.
- backend
- The backend module.
- cast
- Tensor element casting.
- container
- The container module.
- loss
- The loss module.
- module
- The burn module.
- ops
- Operations on tensors module.
- quantization
- Tensor quantization module.
- repr
repr - Burn Tensor representaton
Macros§
- dequant_
op_ quant - Automatically applies dequantization -> float operation -> quantization.
- make_
element - Macro to implement the element trait for a type.
Structs§
- Bool
- A type-level representation of the kind of a bool tensor.
- Bytes
- A sort of
Box<[u8]>that remembers the original alignment and can contain trailing uninitialized bytes. - Data
Deprecated - Data structure for tensors.
- Data
Serialize Deprecated - Data structure for serializing and deserializing tensor data.
- DimIter
- Iterator given by (Tensor::iter_dim).
- Distribution
Sampler - Distribution sampler for random value of a tensor.
- Float
- A type-level representation of the kind of a float tensor
- Int
- A type-level representation of the kind of a int tensor.
- Print
Options - Options for Tensor pretty printing
- Shape
- Shape of a tensor.
- T
- Transpose marker (zero-size type). Used to sugar the transpose of a tensor, e.g.
- Tensor
- A tensor with a given backend, shape and data type.
- Tensor
Data - Data structure for tensors.
- Transaction
- A transaction can read multiple tensors at once with a single operation improving compute utilization with optimized laziness.
- bf16
- A 16-bit floating point type implementing the
bfloat16format. - f16
- A 16-bit floating point type implementing the IEEE 754-2008 standard
binary16a.k.a “half” format.
Enums§
- DType
- Data
Error - The things that can go wrong when manipulating tensor data.
- Distribution
- Distribution for random value of a tensor.
- Distribution
Sampler Kind - Distribution sampler kind for random value of a tensor.
- FloatD
Type - Precision
- Element precision trait for tensor.
- Tensor
Primitive - A primitive tensor representation.
Traits§
- Basic
Autodiff Ops - Trait that list all operations that can be applied on all tensors on an autodiff backend.
- Basic
Ops - Trait that list all operations that can be applied on all tensors.
- Broadcast
Args - Trait used for broadcast arguments.
- Element
- Element trait for tensor.
- Element
Comparison - Element ordering trait.
- Element
Conversion - Element conversion trait for tensor.
- Element
Precision - Element precision trait for tensor.
- Element
Random - Element trait for random value of a tensor.
- Movedim
Args - Trait used for movedim arguments
- Numeric
- Trait that list all operations that can be applied on all numerical tensors.
- Ranges
Arg - Trait used for slice arguments
- Reshape
Args - Trait used for reshape arguments.
- Tensor
Kind - A type-level representation of the kind of a tensor. Metadata access is lazy.
- Tensor
Metadata - Tensor metadata trait for tensor primitive.
Functions§
- argsort
- Returns the indices that sort the elements of the input
tensoralong a given dimension. - argwhere_
data - Compute the indices of the elements that are non-zero, grouped by element.
- cartesian_
grid - Generates a cartesian grid for the given tensor shape on the specified device.
The generated tensor is of dimension
D2 = D + 1, where each element at dimension D contains the cartesian grid coordinates for that element. - check_
closeness std - Checks the closeness of two tensors and prints the results.
- chunk
- Split the tensor along the given dimension into chunks.
- narrow
- Returns a new tensor with the given dimension narrowed to the given range.
- read_
sync - Read a future synchronously.
- set_
print_ options - Set print options
- sort
- Sort the elements of the input
tensorby value along a given dimension. - sort_
with_ indices - Sort the elements of the input
tensorby value along a given dimension. - split
- Splits the tensor along the given dimension into equally sized chunks (if possible)
with size
split_size. Last chunk will be smaller if the tensor size along the given dimensiondimis not divisible bysplit_size. - split_
with_ sizes - Splits the tensor along the given dimension into chunks with sizes in
dimaccording tosplit_sizes. - try_
read_ sync - Read a future synchronously.
Type Aliases§
- Device
- Device type used by the backend.