Trait burn::backend::autodiff::checkpoint::strategy::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) -> ComputingPropertywhere
R: RetroForward,
fn compute_property<R>(retro_forward: R) -> ComputingPropertywhere
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>>,
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
Object Safety§
This trait is not object safe.