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, const D2: usize, A>(
        parents: A,
        builder: &mut CheckpointerBuilder,
    )
       where B2: Backend,
             A: IntoIterator<Item = &'a AutodiffTensor<B2, D2>>;
}
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, const D2: usize, A>( parents: A, builder: &mut CheckpointerBuilder, )
where B2: Backend, A: IntoIterator<Item = &'a AutodiffTensor<B2, D2>>,

Checkpoints parents if necessary in the strategy

Object Safety§

This trait is not object safe.

Implementors§