pub struct ActivationCache {
pub tensors: Vec<Option<TensorRef>>,
}Expand description
Activation buffers retained from a forward_train call.
Implements Drop so device buffers are freed automatically.
Fields§
§tensors: Vec<Option<TensorRef>>Per-node activation tensor, indexed by DAG node index. None for nodes with no cached
activation (e.g. Input placeholders).
Trait Implementations§
Source§impl Drop for ActivationCache
Available on crate feature training only.
impl Drop for ActivationCache
Available on crate feature
training only.Auto Trait Implementations§
impl Freeze for ActivationCache
impl RefUnwindSafe for ActivationCache
impl Send for ActivationCache
impl Sync for ActivationCache
impl Unpin for ActivationCache
impl UnsafeUnpin for ActivationCache
impl UnwindSafe for ActivationCache
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