Re-exports
pub use crate::devices::*;
pub use crate::diff_fns::*;
pub use crate::losses::*;
pub use crate::nn::*;
pub use crate::optim::*;
pub use super::*;
pub use crate::tensor_ops::*;
Structs
Records gradient computations to execute later.
Contains nothing. When TapeHolder::add_operation is called, this function does nothing.
A fake tensor that holds a UniqueId and a type T
that is HasArrayType.
This is created and stored in GradientTape operations to access gradient data
for a tensor that the GradientTape doesn’t have ownership of.
A 0d [Tensor] with shape (). Backed by data f32
.
A 1d [Tensor] with shape (M, ). Backed by data [f32; M]
.
A 2d [Tensor] with shape (M, N). Backed by data [[f32; N]; M]
.
A 3d [Tensor] with shape (M, N, O). Backed by data [[[f32; O]; N]; M]
.
A 4d [Tensor] with shape (M, N, O, P). Backed by data [[[[f32; P]; O]; N]; M]
.
An id used in [Gradients] and Tensors to associate gradients with Tensors.
Contains a boxed GradientTape. When TapeHolder::add_operation is called, this function passes the operation directly to GradientTape.
Traits
Represents something that can be updated with GradientProvider.
Represents something with a compile time known number of elements
Represents something that can return a gradient for a given key.
Something that has HasArrayType, and also can return a reference to or mutate Self::Array
.
Has an associated type that implemented CountElements and ZeroElements.
Something that has a UniqueId
Something that can be turned into a PhantomTensor
Something that has parameters that can be randomized from a generic distribution.
Something that can add a gradient operation to GradientTape.
The main tensor trait. A tensor consists of mainly 1. an array, 2. a device, 3. a unique id.
Something that can be created - currently only implemented for tensors with no tapes.
Something that has compile time known zero values.
Functions
Runs backprop algorithm with all operations contained in the tape that t
has.