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,
) -> Result<(), CheckpointingError>
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,
) -> Result<(), CheckpointingError>where
B2: Backend,
A: IntoIterator<Item = &'a AutodiffTensor<B2>>,
fn checkpoint_parents<'a, B2, A>(
parents: A,
builder: &mut CheckpointerBuilder,
) -> Result<(), CheckpointingError>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".