burn::backend::autodiff::checkpoint::strategy

Trait CheckpointStrategy

pub trait CheckpointStrategy:
    Clone
    + Copy
    + Debug
    + Default
    + Send
    + Sync
    + 'static {
    // Required methods
    fn compute_property<R>(retro_forward: R) -> ComputingProperty
       where R: RetroForward;
    fn checkpoint_parents<'a, B2, A>(
        parents: A,
        builder: &mut CheckpointerBuilder,
    )
       where B2: Backend,
             A: IntoIterator<Item = &'a AutodiffTensor<B2>>;
}
Expand description

Strategy for the amount of checkpointing to do during autodiff

Required Methods§

fn compute_property<R>(retro_forward: R) -> ComputingProperty
where R: RetroForward,

May modify the compute property depending on the strategy

fn checkpoint_parents<'a, B2, A>(parents: A, builder: &mut CheckpointerBuilder)
where B2: Backend, A: IntoIterator<Item = &'a AutodiffTensor<B2>>,

Checkpoints parents if necessary in the strategy

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§