Struct rust_bert::bart::LayerState [−][src]
Expand description
Cache for BART attention layers
Stores the cached value of key, value and key padding mask to avoid recalculation (e.g. at each generation step)
Fields
prev_key: TensorCached keys
prev_value: TensorCached values
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for LayerState
impl Send for LayerState
impl !Sync for LayerState
impl Unpin for LayerState
impl UnwindSafe for LayerState
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
type Output = T
type Output = T
Should always be Self
