Struct rust_bert::t5::T5ModelOutput [−][src]
pub struct T5ModelOutput { pub decoder_output: Tensor, pub encoder_hidden_state: Option<Tensor>, pub next_cache: Option<Vec<(Option<LayerState>, Option<LayerState>)>>, pub all_decoder_hidden_states: Option<Vec<Tensor>>, pub all_decoder_attentions: Option<Vec<Tensor>>, pub all_encoder_hidden_states: Option<Vec<Tensor>>, pub all_encoder_attentions: Option<Vec<Tensor>>, }
Expand description
Container holding a T5 model output. The decoder output may hold the hidden state of the last layer of the decoder, or may hold logits for a custom head module after the decoder (e.g. for language modeling tasks)
Fields
decoder_output: Tensor
Expand description
Hidden state of the last layer of the decoder, or logits for a custom head module after the decoder (e.g. for language modeling tasks)
Expand description
Hidden state for the last layer of the encoder if they are calculated, otherwise None
next_cache: Option<Vec<(Option<LayerState>, Option<LayerState>)>>
Expand description
Cached outputs of the model (attention layers keys and values) if the model is used for generation
Expand description
Hidden states for all layers of the decoder
all_decoder_attentions: Option<Vec<Tensor>>
Expand description
Attention weights for all layers of the decoder
Expand description
Hidden states for all layers of the encoder
all_encoder_attentions: Option<Vec<Tensor>>
Expand description
Attention weights for all layers of the encoder
Auto Trait Implementations
impl RefUnwindSafe for T5ModelOutput
impl Send for T5ModelOutput
impl !Sync for T5ModelOutput
impl Unpin for T5ModelOutput
impl UnwindSafe for T5ModelOutput
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,