pub struct Checkpointer { /* private fields */ }Expand description
Struct responsible of fetching the output for a node in the autodiff graph during a backward pass
Implementations§
Source§impl Checkpointer
impl Checkpointer
Sourcepub fn new(
backward_states: BackwardStates,
retro_forwards: RetroForwards,
node_tree: NodeTree,
) -> Self
pub fn new( backward_states: BackwardStates, retro_forwards: RetroForwards, node_tree: NodeTree, ) -> Self
Constructs a new Checkpointer.
Source§impl Checkpointer
impl Checkpointer
Sourcepub fn retrieve_node_output<T>(&mut self, node_id: NodeId) -> T
pub fn retrieve_node_output<T>(&mut self, node_id: NodeId) -> T
Gives the output of the given node, by recursively asking parents to compute themselves or give their pre-computed tensors.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Checkpointer
impl !Send for Checkpointer
impl !Sync for Checkpointer
impl !UnwindSafe for Checkpointer
impl Freeze for Checkpointer
impl Unpin for Checkpointer
impl UnsafeUnpin for Checkpointer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more