§
    Ý˜ºh¸Û  ã                  óÞ  — d dl mZ d dlZd dlmZ d dlZddlmZ e G d„ de¦  «        ¦   «         Z	e G d„ d	e¦  «        ¦   «         Z
e G d
„ de¦  «        ¦   «         Ze G d„ de¦  «        ¦   «         Ze G d„ de¦  «        ¦   «         Ze G d„ de¦  «        ¦   «         Ze G d„ de¦  «        ¦   «         Ze G d„ de¦  «        ¦   «         Ze G d„ de¦  «        ¦   «         Ze G d„ de¦  «        ¦   «         Ze G d„ de¦  «        ¦   «         Ze G d„ de¦  «        ¦   «         Ze G d„ de¦  «        ¦   «         Ze G d „ d!e¦  «        ¦   «         Ze G d"„ d#e¦  «        ¦   «         Ze G d$„ d%e¦  «        ¦   «         Ze G d&„ d'e¦  «        ¦   «         Ze G d(„ d)e¦  «        ¦   «         Ze G d*„ d+e¦  «        ¦   «         Ze G d,„ d-e¦  «        ¦   «         Ze G d.„ d/e¦  «        ¦   «         Ze G d0„ d1e¦  «        ¦   «         Ze G d2„ d3e¦  «        ¦   «         Ze G d4„ d5e¦  «        ¦   «         Z e G d6„ d7e¦  «        ¦   «         Z!e G d8„ d9e¦  «        ¦   «         Z"e G d:„ d;e¦  «        ¦   «         Z#dS )<é    )ÚannotationsN)Ú	dataclassé   )ÚModelOutputc                  ó>   — e Zd ZU dZdZded<   dZded<   dZded<   dS )ÚTFBaseModelOutputai  
    Base class for model's outputs, with potential hidden states and attentions.

    Args:
        last_hidden_state (`tf.Tensor` of shape `(batch_size, sequence_length, hidden_size)`):
            Sequence of hidden-states at the output of the last layer of the model.
        hidden_states (`tuple(tf.FloatTensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings + one for the output of each layer) of shape
            `(batch_size, sequence_length, hidden_size)`.

            Hidden-states of the model at the output of each layer plus the initial embedding outputs.
        attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
            heads.
    Nútf.Tensor | NoneÚlast_hidden_stateútuple[tf.Tensor] | NoneÚhidden_statesÚ
attentions)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r
   Ú__annotations__r   r   © ó    úh/var/www/html/services/rag-service/venv/lib/python3.11/site-packages/transformers/modeling_tf_outputs.pyr   r      sR   € € € € € € ðð ð& +/ÐÐ.Ð.Ð.Ñ.Ø-1€MÐ1Ð1Ð1Ñ1Ø*.€JÐ.Ð.Ð.Ñ.Ð.Ð.r   r   c                  ó0   — e Zd ZU dZdZded<   dZded<   dS )Ú TFBaseModelOutputWithNoAttentionaÝ  
    Base class for model's outputs, with potential hidden states.

    Args:
        last_hidden_state (`tf.Tensor` shape `(batch_size, num_channels, height, width)`):
            Sequence of hidden-states at the output of the last layer of the model.
        hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings, if the model has an embedding layer, + one for
            the output of each layer) of shape `(batch_size, num_channels, height, width)`.

            Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.
    Nr	   r
   útuple[tf.Tensor, ...] | Noner   )r   r   r   r   r
   r   r   r   r   r   r   r   3   sA   € € € € € € ðð ð +/ÐÐ.Ð.Ð.Ñ.Ø26€MÐ6Ð6Ð6Ñ6Ð6Ð6r   r   c                  óL   — e Zd ZU dZdZded<   dZded<   dZded<   dZded<   dS )	ÚTFBaseModelOutputWithPoolinga½  
    Base class for model's outputs that also contains a pooling of the last hidden states.

    Args:
        last_hidden_state (`tf.Tensor` of shape `(batch_size, sequence_length, hidden_size)`):
            Sequence of hidden-states at the output of the last layer of the model.
        pooler_output (`tf.Tensor` of shape `(batch_size, hidden_size)`):
            Last layer hidden-state of the first token of the sequence (classification token) further processed by a
            Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
            prediction (classification) objective during pretraining.

            This output is usually *not* a good summary of the semantic content of the input, you're often better with
            averaging or pooling the sequence of hidden-states for the whole input sequence.
        hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings + one for the output of each layer) of shape
            `(batch_size, sequence_length, hidden_size)`.

            Hidden-states of the model at the output of each layer plus the initial embedding outputs.
        attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
            heads.
    Nr	   r
   Úpooler_outputr   r   r   )	r   r   r   r   r
   r   r   r   r   r   r   r   r   r   F   sc   € € € € € € ðð ð4 +/ÐÐ.Ð.Ð.Ñ.Ø&*€MÐ*Ð*Ð*Ñ*Ø-1€MÐ1Ð1Ð1Ñ1Ø*.€JÐ.Ð.Ð.Ñ.Ð.Ð.r   r   c                  ó>   — e Zd ZU dZdZded<   dZded<   dZded<   dS )Ú*TFBaseModelOutputWithPoolingAndNoAttentionaœ  
    Base class for model's outputs that also contains a pooling of the last hidden states.

    Args:
        last_hidden_state (`tf.Tensor` of shape `(batch_size, num_channels, height, width)`):
            Sequence of hidden-states at the output of the last layer of the model.
        pooler_output (`tf.Tensor` of shape `(batch_size, hidden_size)`):
            Last layer hidden-state after a pooling operation on the spatial dimensions.
        hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings, if the model has an embedding layer, + one for
            the output of each layer) of shape `(batch_size, num_channels, height, width)`.

            Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.
    Nr	   r
   r   r   r   )r   r   r   r   r
   r   r   r   r   r   r   r   r   h   sR   € € € € € € ðð ð +/ÐÐ.Ð.Ð.Ñ.Ø&*€MÐ*Ð*Ð*Ñ*Ø26€MÐ6Ð6Ð6Ñ6Ð6Ð6r   r   c                  óh   — e Zd ZU dZdZded<   dZded<   dZded<   dZded	<   dZ	ded
<   dZ
ded<   dS )Ú.TFBaseModelOutputWithPoolingAndCrossAttentionsao
  
    Base class for model's outputs that also contains a pooling of the last hidden states.

    Args:
        last_hidden_state (`tf.Tensor` of shape `(batch_size, sequence_length, hidden_size)`):
            Sequence of hidden-states at the output of the last layer of the model.
        pooler_output (`tf.Tensor` of shape `(batch_size, hidden_size)`):
            Last layer hidden-state of the first token of the sequence (classification token) further processed by a
            Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
            prediction (classification) objective during pretraining.

            This output is usually *not* a good summary of the semantic content of the input, you're often better with
            averaging or pooling the sequence of hidden-states for the whole input sequence.
        past_key_values (`list[tf.Tensor]`, *optional*, returned when `use_cache=True` is passed or when `config.use_cache=True`):
            List of `tf.Tensor` of length `config.n_layers`, with each tensor of shape `(2, batch_size, num_heads,
            sequence_length, embed_size_per_head)`).

            Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
            `past_key_values` input) to speed up sequential decoding.
        hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings + one for the output of each layer) of shape
            `(batch_size, sequence_length, hidden_size)`.

            Hidden-states of the model at the output of each layer plus the initial embedding outputs.
        attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
            heads.
        cross_attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights of the decoder's cross-attention layer, after the attention softmax, used to compute the
            weighted average in the cross-attention heads.
    Nr	   r
   r   úlist[tf.Tensor] | NoneÚpast_key_valuesr   r   r   Úcross_attentions)r   r   r   r   r
   r   r   r!   r   r   r"   r   r   r   r   r   ~   s‡   € € € € € € ð$ð $ðL +/ÐÐ.Ð.Ð.Ñ.Ø&*€MÐ*Ð*Ð*Ñ*Ø.2€OÐ2Ð2Ð2Ñ2Ø-1€MÐ1Ð1Ð1Ñ1Ø*.€JÐ.Ð.Ð.Ñ.Ø04ÐÐ4Ð4Ð4Ñ4Ð4Ð4r   r   c                  óL   — e Zd ZU dZdZded<   dZded<   dZded<   dZded	<   dS )
ÚTFBaseModelOutputWithPasta÷  
    Base class for model's outputs that may also contain a past key/values (to speed up sequential decoding).

    Args:
        last_hidden_state (`tf.Tensor` of shape `(batch_size, sequence_length, hidden_size)`):
            Sequence of hidden-states at the output of the last layer of the model.

            If `past_key_values` is used only the last hidden-state of the sequences of shape `(batch_size, 1,
            hidden_size)` is output.
        past_key_values (`list[tf.Tensor]`, *optional*, returned when `use_cache=True` is passed or when `config.use_cache=True`):
            List of `tf.Tensor` of length `config.n_layers`, with each tensor of shape `(2, batch_size, num_heads,
            sequence_length, embed_size_per_head)`).

            Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
            `past_key_values` input) to speed up sequential decoding.
        hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings + one for the output of each layer) of shape
            `(batch_size, sequence_length, hidden_size)`.

            Hidden-states of the model at the output of each layer plus the initial embedding outputs.
        attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
            heads.
    Nr	   r
   r    r!   r   r   r   )	r   r   r   r   r
   r   r!   r   r   r   r   r   r$   r$   ®   sc   € € € € € € ðð ð8 +/ÐÐ.Ð.Ð.Ñ.Ø.2€OÐ2Ð2Ð2Ñ2Ø-1€MÐ1Ð1Ð1Ñ1Ø*.€JÐ.Ð.Ð.Ñ.Ð.Ð.r   r$   c                  óL   — e Zd ZU dZdZded<   dZded<   dZded<   dZded<   dS )	Ú$TFBaseModelOutputWithCrossAttentionsa:  
    Base class for model's outputs, with potential hidden states and attentions.

    Args:
        last_hidden_state (`tf.Tensor` of shape `(batch_size, sequence_length, hidden_size)`):
            Sequence of hidden-states at the output of the last layer of the model.
        hidden_states (`tuple(tf.FloatTensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings + one for the output of each layer) of shape
            `(batch_size, sequence_length, hidden_size)`.

            Hidden-states of the model at the output of each layer plus the initial embedding outputs.
        attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
            heads.
        cross_attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights of the decoder's cross-attention layer, after the attention softmax, used to compute the
            weighted average in the cross-attention heads.
    Nr	   r
   r   r   r   r"   )	r   r   r   r   r
   r   r   r   r"   r   r   r   r&   r&   Ò   sd   € € € € € € ðð ð2 +/ÐÐ.Ð.Ð.Ñ.Ø-1€MÐ1Ð1Ð1Ñ1Ø*.€JÐ.Ð.Ð.Ñ.Ø04ÐÐ4Ð4Ð4Ñ4Ð4Ð4r   r&   c                  óZ   — e Zd ZU dZdZded<   dZded<   dZded<   dZded	<   dZ	ded
<   dS )Ú+TFBaseModelOutputWithPastAndCrossAttentionsaÍ  
    Base class for model's outputs that may also contain a past key/values (to speed up sequential decoding).

    Args:
        last_hidden_state (`tf.Tensor` of shape `(batch_size, sequence_length, hidden_size)`):
            Sequence of hidden-states at the output of the last layer of the model.

            If `past_key_values` is used only the last hidden-state of the sequences of shape `(batch_size, 1,
            hidden_size)` is output.
        past_key_values (`list[tf.Tensor]`, *optional*, returned when `use_cache=True` is passed or when `config.use_cache=True`):
            List of `tf.Tensor` of length `config.n_layers`, with each tensor of shape `(2, batch_size, num_heads,
            sequence_length, embed_size_per_head)`).

            Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
            `past_key_values` input) to speed up sequential decoding.
        hidden_states (`tuple(tf.FloatTensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings + one for the output of each layer) of shape
            `(batch_size, sequence_length, hidden_size)`.

            Hidden-states of the model at the output of each layer plus the initial embedding outputs.
        attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
            heads.
        cross_attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights of the decoder's cross-attention layer, after the attention softmax, used to compute the
            weighted average in the cross-attention heads.
    Nr	   r
   r    r!   r   r   r   r"   )
r   r   r   r   r
   r   r!   r   r   r"   r   r   r   r(   r(   ó   sv   € € € € € € ð ð  ðD +/ÐÐ.Ð.Ð.Ñ.Ø.2€OÐ2Ð2Ð2Ñ2Ø-1€MÐ1Ð1Ð1Ñ1Ø*.€JÐ.Ð.Ð.Ñ.Ø04ÐÐ4Ð4Ð4Ñ4Ð4Ð4r   r(   c                  ó„   — e Zd ZU dZdZded<   dZded<   dZded<   dZded	<   dZ	ded
<   dZ
ded<   dZded<   dZded<   dS )ÚTFSeq2SeqModelOutputah  
    Base class for model encoder's outputs that also contains : pre-computed hidden states that can speed up sequential
    decoding.

    Args:
        last_hidden_state (`tf.Tensor` of shape `(batch_size, sequence_length, hidden_size)`):
            Sequence of hidden-states at the output of the last layer of the decoder of the model.

            If `past_key_values` is used only the last hidden-state of the sequences of shape `(batch_size, 1,
            hidden_size)` is output.
        past_key_values (`list[tf.Tensor]`, *optional*, returned when `use_cache=True` is passed or when `config.use_cache=True`):
            List of `tf.Tensor` of length `config.n_layers`, with each tensor of shape `(2, batch_size, num_heads,
            sequence_length, embed_size_per_head)`).

            Contains pre-computed hidden-states (key and values in the attention blocks) of the decoder that can be
            used (see `past_key_values` input) to speed up sequential decoding.
        decoder_hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings + one for the output of each layer) of shape
            `(batch_size, sequence_length, hidden_size)`.

            Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.
        decoder_attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
            self-attention heads.
        cross_attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights of the decoder's cross-attention layer, after the attention softmax, used to compute the
            weighted average in the cross-attention heads.
        encoder_last_hidden_state (`tf.Tensor` of shape `(batch_size, sequence_length, hidden_size)`, *optional*):
            Sequence of hidden-states at the output of the last layer of the encoder of the model.
        encoder_hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings + one for the output of each layer) of shape
            `(batch_size, sequence_length, hidden_size)`.

            Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.
        encoder_attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
            self-attention heads.
    Nr	   r
   r    r!   r   Údecoder_hidden_statesÚdecoder_attentionsr"   Úencoder_last_hidden_stateÚencoder_hidden_statesÚencoder_attentions)r   r   r   r   r
   r   r!   r+   r,   r"   r-   r.   r/   r   r   r   r*   r*     s®   € € € € € € ð.ð .ð` +/ÐÐ.Ð.Ð.Ñ.Ø.2€OÐ2Ð2Ð2Ñ2Ø59ÐÐ9Ð9Ð9Ñ9Ø26ÐÐ6Ð6Ð6Ñ6Ø04ÐÐ4Ð4Ð4Ñ4Ø26ÐÐ6Ð6Ð6Ñ6Ø59ÐÐ9Ð9Ð9Ñ9Ø26ÐÐ6Ð6Ð6Ñ6Ð6Ð6r   r*   c                  óL   — e Zd ZU dZdZded<   dZded<   dZded<   dZded<   dS )	ÚTFCausalLMOutputa7  
    Base class for causal language model (or autoregressive) outputs.

    Args:
        loss (`tf.Tensor` of shape `(n,)`, *optional*, where n is the number of non-masked labels, returned when `labels` is provided):
            Language modeling loss (for next-token prediction).
        logits (`tf.Tensor` of shape `(batch_size, sequence_length, config.vocab_size)`):
            Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).
        hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings + one for the output of each layer) of shape
            `(batch_size, sequence_length, hidden_size)`.

            Hidden-states of the model at the output of each layer plus the initial embedding outputs.
        attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
            heads.
    Nr	   ÚlossÚlogitsr   r   r   ©	r   r   r   r   r2   r   r3   r   r   r   r   r   r1   r1   Z  ób   € € € € € € ðð ð* "€DÐ!Ð!Ð!Ñ!Ø#€FÐ#Ð#Ð#Ñ#Ø-1€MÐ1Ð1Ð1Ñ1Ø*.€JÐ.Ð.Ð.Ñ.Ð.Ð.r   r1   c                  óZ   — e Zd ZU dZdZded<   dZded<   dZded<   dZded	<   dZ	ded
<   dS )ÚTFCausalLMOutputWithPasta  
    Base class for causal language model (or autoregressive) outputs.

    Args:
        loss (`tf.Tensor` of shape `(n,)`, *optional*, where n is the number of non-masked labels, returned when `labels` is provided):
            Language modeling loss (for next-token prediction).
        logits (`tf.Tensor` of shape `(batch_size, sequence_length, config.vocab_size)`):
            Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).
        past_key_values (`list[tf.Tensor]`, *optional*, returned when `use_cache=True` is passed or when `config.use_cache=True`):
            List of `tf.Tensor` of length `config.n_layers`, with each tensor of shape `(2, batch_size, num_heads,
            sequence_length, embed_size_per_head)`).

            Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
            `past_key_values` input) to speed up sequential decoding.
        hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings + one for the output of each layer) of shape
            `(batch_size, sequence_length, hidden_size)`.

            Hidden-states of the model at the output of each layer plus the initial embedding outputs.
        attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
            heads.
    Nr	   r2   r3   r    r!   r   r   r   ©
r   r   r   r   r2   r   r3   r!   r   r   r   r   r   r7   r7   w  ós   € € € € € € ðð ð6 "€DÐ!Ð!Ð!Ñ!Ø#€FÐ#Ð#Ð#Ñ#Ø.2€OÐ2Ð2Ð2Ñ2Ø-1€MÐ1Ð1Ð1Ñ1Ø*.€JÐ.Ð.Ð.Ñ.Ð.Ð.r   r7   c                  óh   — e Zd ZU dZdZded<   dZded<   dZded<   dZded	<   dZ	ded
<   dZ
ded<   dS )Ú#TFCausalLMOutputWithCrossAttentionsaé  
    Base class for causal language model (or autoregressive) outputs.

    Args:
        loss (`tf.Tensor` of shape `(n,)`, *optional*, where n is the number of non-masked labels, returned when `labels` is provided):
            Language modeling loss (for next-token prediction).
        logits (`tf.Tensor` of shape `(batch_size, sequence_length, config.vocab_size)`):
            Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).
        hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings + one for the output of each layer) of shape
            `(batch_size, sequence_length, hidden_size)`.

            Hidden-states of the model at the output of each layer plus the initial embedding outputs.
        attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
            heads.
        cross_attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights of the decoder's cross-attention layer, after the attention softmax, used to compute the
            weighted average in the cross-attention heads.
        past_key_values (`list[tf.Tensor]`, *optional*, returned when `use_cache=True` is passed or when `config.use_cache=True`):
            List of `tf.Tensor` of length `config.n_layers`, with each tensor of shape `(2, batch_size, num_heads,
            sequence_length, embed_size_per_head)`).

            Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
            `past_key_values` input) to speed up sequential decoding.
    Nr	   r2   r3   r    r!   r   r   r   r"   )r   r   r   r   r2   r   r3   r!   r   r   r"   r   r   r   r;   r;   ›  s†   € € € € € € ðð ðB "€DÐ!Ð!Ð!Ñ!Ø#€FÐ#Ð#Ð#Ñ#Ø.2€OÐ2Ð2Ð2Ñ2Ø-1€MÐ1Ð1Ð1Ñ1Ø*.€JÐ.Ð.Ð.Ñ.Ø04ÐÐ4Ð4Ð4Ñ4Ð4Ð4r   r;   c                  óL   — e Zd ZU dZdZded<   dZded<   dZded<   dZded<   dS )	ÚTFMaskedLMOutputa  
    Base class for masked language models outputs.

    Args:
        loss (`tf.Tensor` of shape `(n,)`, *optional*, where n is the number of non-masked labels, returned when `labels` is provided):
            Masked language modeling (MLM) loss.
        logits (`tf.Tensor` of shape `(batch_size, sequence_length, config.vocab_size)`):
            Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).
        hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings + one for the output of each layer) of shape
            `(batch_size, sequence_length, hidden_size)`.

            Hidden-states of the model at the output of each layer plus the initial embedding outputs.
        attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
            heads.
    Nr	   r2   r3   r   r   r   r4   r   r   r   r=   r=   Æ  r5   r   r=   c                  ó’   — e Zd ZU dZdZded<   dZded<   dZded<   dZded	<   dZ	ded
<   dZ
ded<   dZded<   dZded<   dZded<   dS )ÚTFSeq2SeqLMOutputaA  
    Base class for sequence-to-sequence language models outputs.

    Args:
        loss (`tf.Tensor` of shape `(n,)`, *optional*, where n is the number of non-masked labels, returned when `labels` is provided):
            Language modeling loss.
        logits (`tf.Tensor` of shape `(batch_size, sequence_length, config.vocab_size)`):
            Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).
        past_key_values (`list[tf.Tensor]`, *optional*, returned when `use_cache=True` is passed or when `config.use_cache=True`):
            List of `tf.Tensor` of length `config.n_layers`, with each tensor of shape `(2, batch_size, num_heads,
            sequence_length, embed_size_per_head)`).

            Contains pre-computed hidden-states (key and values in the attention blocks) of the decoder that can be
            used (see `past_key_values` input) to speed up sequential decoding.
        decoder_hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings + one for the output of each layer) of shape
            `(batch_size, sequence_length, hidden_size)`.

            Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.
        decoder_attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
            self-attention heads.
        cross_attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights of the decoder's cross-attention layer, after the attention softmax, used to compute the
            weighted average in the cross-attention heads.
        encoder_last_hidden_state (`tf.Tensor` of shape `(batch_size, sequence_length, hidden_size)`, *optional*):
            Sequence of hidden-states at the output of the last layer of the encoder of the model.
        encoder_hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings + one for the output of each layer) of shape
            `(batch_size, sequence_length, hidden_size)`.

            Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.
        encoder_attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
            self-attention heads.
    Nr	   r2   r3   r    r!   r   r+   r,   r"   r-   r.   r/   ©r   r   r   r   r2   r   r3   r!   r+   r,   r"   r-   r.   r/   r   r   r   r?   r?   ã  s¾   € € € € € € ð,ð ,ð\ "€DÐ!Ð!Ð!Ñ!Ø#€FÐ#Ð#Ð#Ñ#Ø.2€OÐ2Ð2Ð2Ñ2Ø59ÐÐ9Ð9Ð9Ñ9Ø26ÐÐ6Ð6Ð6Ñ6Ø04ÐÐ4Ð4Ð4Ñ4Ø26ÐÐ6Ð6Ð6Ñ6Ø59ÐÐ9Ð9Ð9Ñ9Ø26ÐÐ6Ð6Ð6Ñ6Ð6Ð6r   r?   c                  óL   — e Zd ZU dZdZded<   dZded<   dZded<   dZded<   dS )	ÚTFNextSentencePredictorOutputaF  
    Base class for outputs of models predicting if two sentences are consecutive or not.

    Args:
        loss (`tf.Tensor` of shape `(n,)`, *optional*, where n is the number of non-masked labels, returned when `next_sentence_label` is provided):
            Next sentence prediction loss.
        logits (`tf.Tensor` of shape `(batch_size, 2)`):
            Prediction scores of the next sequence prediction (classification) head (scores of True/False continuation
            before SoftMax).
        hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings + one for the output of each layer) of shape
            `(batch_size, sequence_length, hidden_size)`.

            Hidden-states of the model at the output of each layer plus the initial embedding outputs.
        attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
            heads.
    Nr	   r2   r3   r   r   r   r4   r   r   r   rB   rB     sb   € € € € € € ðð ð, "€DÐ!Ð!Ð!Ñ!Ø#€FÐ#Ð#Ð#Ñ#Ø-1€MÐ1Ð1Ð1Ñ1Ø*.€JÐ.Ð.Ð.Ñ.Ð.Ð.r   rB   c                  óL   — e Zd ZU dZdZded<   dZded<   dZded<   dZded<   dS )	ÚTFSequenceClassifierOutputaò  
    Base class for outputs of sentence classification models.

    Args:
        loss (`tf.Tensor` of shape `(batch_size, )`, *optional*, returned when `labels` is provided):
            Classification (or regression if config.num_labels==1) loss.
        logits (`tf.Tensor` of shape `(batch_size, config.num_labels)`):
            Classification (or regression if config.num_labels==1) scores (before SoftMax).
        hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings + one for the output of each layer) of shape
            `(batch_size, sequence_length, hidden_size)`.

            Hidden-states of the model at the output of each layer plus the initial embedding outputs.
        attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
            heads.
    Nr	   r2   r3   r   r   r   r4   r   r   r   rD   rD   <  r5   r   rD   c                  ó’   — e Zd ZU dZdZded<   dZded<   dZded<   dZded	<   dZ	ded
<   dZ
ded<   dZded<   dZded<   dZded<   dS )Ú!TFSeq2SeqSequenceClassifierOutputar  
    Base class for outputs of sequence-to-sequence sentence classification models.

    Args:
        loss (`tf.Tensor` of shape `(1,)`, *optional*, returned when `label` is provided):
            Classification (or regression if config.num_labels==1) loss.
        logits (`tf.Tensor` of shape `(batch_size, config.num_labels)`):
            Classification (or regression if config.num_labels==1) scores (before SoftMax).
        past_key_values (`list[tf.Tensor]`, *optional*, returned when `use_cache=True` is passed or when `config.use_cache=True`):
            List of `tf.Tensor` of length `config.n_layers`, with each tensor of shape `(2, batch_size, num_heads,
            sequence_length, embed_size_per_head)`).

            Contains pre-computed hidden-states (key and values in the attention blocks) of the decoder that can be
            used (see `past_key_values` input) to speed up sequential decoding.
        decoder_hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings + one for the output of each layer) of shape
            `(batch_size, sequence_length, hidden_size)`.

            Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.
        decoder_attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
            self-attention heads.
        cross_attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`
        encoder_last_hidden_state (`tf.Tensor` of shape `(batch_size, sequence_length, hidden_size)`, *optional*):
            Sequence of hidden-states at the output of the last layer of the encoder of the model.
        encoder_hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings + one for the output of each layer) of shape
            `(batch_size, sequence_length, hidden_size)`.

            Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.
        encoder_attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
            self-attention heads.
    Nr	   r2   r3   r    r!   r   r+   r,   r"   r-   r.   r/   r@   r   r   r   rF   rF   Y  s¾   € € € € € € ð)ð )ðV "€DÐ!Ð!Ð!Ñ!Ø#€FÐ#Ð#Ð#Ñ#Ø.2€OÐ2Ð2Ð2Ñ2Ø59ÐÐ9Ð9Ð9Ñ9Ø26ÐÐ6Ð6Ð6Ñ6Ø04ÐÐ4Ð4Ð4Ñ4Ø26ÐÐ6Ð6Ð6Ñ6Ø59ÐÐ9Ð9Ð9Ñ9Ø26ÐÐ6Ð6Ð6Ñ6Ð6Ð6r   rF   c                  óL   — e Zd ZU dZdZded<   dZded<   dZded<   dZded<   dS )	ÚTFSemanticSegmenterOutputa†  
    Base class for outputs of semantic segmentation models.

    Args:
        loss (`tf.Tensor` of shape `(1,)`, *optional*, returned when `labels` is provided):
            Classification (or regression if config.num_labels==1) loss.
        logits (`tf.Tensor` of shape `(batch_size, config.num_labels, logits_height, logits_width)`):
            Classification scores for each pixel.

            <Tip warning={true}>

            The logits returned do not necessarily have the same size as the `pixel_values` passed as inputs. This is
            to avoid doing two interpolations and lose some quality when a user needs to resize the logits to the
            original image size as post-processing. You should always check your logits shape and resize as needed.

            </Tip>

        hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings, if the model has an embedding layer, + one for
            the output of each layer) of shape `(batch_size, patch_size, hidden_size)`.

            Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.
        attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, patch_size, sequence_length)`.

            Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
            heads.
    Nr	   r2   r3   r   r   r   r4   r   r   r   rH   rH   ‘  sb   € € € € € € ðð ð: "€DÐ!Ð!Ð!Ñ!Ø#€FÐ#Ð#Ð#Ñ#Ø-1€MÐ1Ð1Ð1Ñ1Ø*.€JÐ.Ð.Ð.Ñ.Ð.Ð.r   rH   c                  ó>   — e Zd ZU dZdZded<   dZded<   dZded<   dS )Ú(TFSemanticSegmenterOutputWithNoAttentiona  
    Base class for outputs of semantic segmentation models that do not output attention scores.

    Args:
        loss (`tf.Tensor` of shape `(1,)`, *optional*, returned when `labels` is provided):
            Classification (or regression if config.num_labels==1) loss.
        logits (`tf.Tensor` of shape `(batch_size, config.num_labels, logits_height, logits_width)`):
            Classification scores for each pixel.

            <Tip warning={true}>

            The logits returned do not necessarily have the same size as the `pixel_values` passed as inputs. This is
            to avoid doing two interpolations and lose some quality when a user needs to resize the logits to the
            original image size as post-processing. You should always check your logits shape and resize as needed.

            </Tip>

        hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings, if the model has an embedding layer, + one for
            the output of each layer) of shape `(batch_size, patch_size, hidden_size)`.

            Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.
    Nr	   r2   r3   r   r   ©r   r   r   r   r2   r   r3   r   r   r   r   rJ   rJ   ¶  sQ   € € € € € € ðð ð0 "€DÐ!Ð!Ð!Ñ!Ø#€FÐ#Ð#Ð#Ñ#Ø-1€MÐ1Ð1Ð1Ñ1Ð1Ð1r   rJ   c                  óL   — e Zd ZU dZdZded<   dZded<   dZded<   dZded<   dS )	ÚTFImageClassifierOutputañ  
    Base class for outputs of image classification models.

    Args:
        loss (`tf.Tensor` of shape `(1,)`, *optional*, returned when `labels` is provided):
            Classification (or regression if config.num_labels==1) loss.
        logits (`tf.Tensor` of shape `(batch_size, config.num_labels)`):
            Classification (or regression if config.num_labels==1) scores (before SoftMax).
        hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings, if the model has an embedding layer, + one for
            the output of each stage) of shape `(batch_size, sequence_length, hidden_size)`. Hidden-states (also called
            feature maps) of the model at the output of each stage.
        attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, patch_size, sequence_length)`.

            Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
            heads.
    Nr	   r2   r3   r   r   r   r4   r   r   r   rM   rM   Õ  sb   € € € € € € ðð ð& "€DÐ!Ð!Ð!Ñ!Ø#€FÐ#Ð#Ð#Ñ#Ø-1€MÐ1Ð1Ð1Ñ1Ø*.€JÐ.Ð.Ð.Ñ.Ð.Ð.r   rM   c                  óL   — e Zd ZU dZdZded<   dZded<   dZded<   dZded<   dS )	ÚTFMultipleChoiceModelOutputaö  
    Base class for outputs of multiple choice models.

    Args:
        loss (`tf.Tensor` of shape *(batch_size, )*, *optional*, returned when `labels` is provided):
            Classification loss.
        logits (`tf.Tensor` of shape `(batch_size, num_choices)`):
            *num_choices* is the second dimension of the input tensors. (see *input_ids* above).

            Classification scores (before SoftMax).
        hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings + one for the output of each layer) of shape
            `(batch_size, sequence_length, hidden_size)`.

            Hidden-states of the model at the output of each layer plus the initial embedding outputs.
        attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
            heads.
    Nr	   r2   r3   r   r   r   r4   r   r   r   rO   rO   ð  sb   € € € € € € ðð ð. "€DÐ!Ð!Ð!Ñ!Ø#€FÐ#Ð#Ð#Ñ#Ø-1€MÐ1Ð1Ð1Ñ1Ø*.€JÐ.Ð.Ð.Ñ.Ð.Ð.r   rO   c                  óL   — e Zd ZU dZdZded<   dZded<   dZded<   dZded<   dS )	ÚTFTokenClassifierOutputaÑ  
    Base class for outputs of token classification models.

    Args:
        loss (`tf.Tensor` of shape `(n,)`, *optional*, where n is the number of unmasked labels, returned when `labels` is provided) :
            Classification loss.
        logits (`tf.Tensor` of shape `(batch_size, sequence_length, config.num_labels)`):
            Classification scores (before SoftMax).
        hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings + one for the output of each layer) of shape
            `(batch_size, sequence_length, hidden_size)`.

            Hidden-states of the model at the output of each layer plus the initial embedding outputs.
        attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
            heads.
    Nr	   r2   r3   r   r   r   r4   r   r   r   rQ   rQ     r5   r   rQ   c                  óZ   — e Zd ZU dZdZded<   dZded<   dZded<   dZded<   dZ	ded	<   dS )
ÚTFQuestionAnsweringModelOutputay  
    Base class for outputs of question answering models.

    Args:
        loss (`tf.Tensor` of shape `(batch_size, )`, *optional*, returned when `start_positions` and `end_positions` are provided):
            Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.
        start_logits (`tf.Tensor` of shape `(batch_size, sequence_length)`):
            Span-start scores (before SoftMax).
        end_logits (`tf.Tensor` of shape `(batch_size, sequence_length)`):
            Span-end scores (before SoftMax).
        hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings + one for the output of each layer) of shape
            `(batch_size, sequence_length, hidden_size)`.

            Hidden-states of the model at the output of each layer plus the initial embedding outputs.
        attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
            heads.
    Nr	   r2   Ústart_logitsÚ
end_logitsr   r   r   )
r   r   r   r   r2   r   rT   rU   r   r   r   r   r   rS   rS   ,  ss   € € € € € € ðð ð. "€DÐ!Ð!Ð!Ñ!Ø%)€LÐ)Ð)Ð)Ñ)Ø#'€JÐ'Ð'Ð'Ñ'Ø-1€MÐ1Ð1Ð1Ñ1Ø*.€JÐ.Ð.Ð.Ñ.Ð.Ð.r   rS   c                  ó’   — e Zd ZU dZdZded<   dZded<   dZded<   dZded<   dZ	d	ed
<   dZ
d	ed<   dZded<   dZd	ed<   dZd	ed<   dS )Ú%TFSeq2SeqQuestionAnsweringModelOutputaÀ  
    Base class for outputs of sequence-to-sequence question answering models.

    Args:
        loss (`tf.Tensor` of shape `(1,)`, *optional*, returned when `labels` is provided):
            Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.
        start_logits (`tf.Tensor` of shape `(batch_size, sequence_length)`):
            Span-start scores (before SoftMax).
        end_logits (`tf.Tensor` of shape `(batch_size, sequence_length)`):
            Span-end scores (before SoftMax).
        past_key_values (`list[tf.Tensor]`, *optional*, returned when `use_cache=True` is passed or when `config.use_cache=True`):
            List of `tf.Tensor` of length `config.n_layers`, with each tensor of shape `(2, batch_size, num_heads,
            sequence_length, embed_size_per_head)`).

            Contains pre-computed hidden-states (key and values in the attention blocks) of the decoder that can be
            used (see `past_key_values` input) to speed up sequential decoding.
        decoder_hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings + one for the output of each layer) of shape
            `(batch_size, sequence_length, hidden_size)`.

            Hidden-states of the decoder at the output of each layer plus the initial embedding outputs.
        decoder_attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights of the decoder, after the attention softmax, used to compute the weighted average in the
            self-attention heads.
        encoder_last_hidden_state (`tf.Tensor` of shape `(batch_size, sequence_length, hidden_size)`, *optional*):
            Sequence of hidden-states at the output of the last layer of the encoder of the model.
        encoder_hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings + one for the output of each layer) of shape
            `(batch_size, sequence_length, hidden_size)`.

            Hidden-states of the encoder at the output of each layer plus the initial embedding outputs.
        encoder_attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights of the encoder, after the attention softmax, used to compute the weighted average in the
            self-attention heads.
    Nr	   r2   rT   rU   r    r!   r   r+   r,   r-   r.   r/   )r   r   r   r   r2   r   rT   rU   r!   r+   r,   r-   r.   r/   r   r   r   rW   rW   L  s½   € € € € € € ð(ð (ðT "€DÐ!Ð!Ð!Ñ!Ø%)€LÐ)Ð)Ð)Ñ)Ø#'€JÐ'Ð'Ð'Ñ'Ø.2€OÐ2Ð2Ð2Ñ2Ø59ÐÐ9Ð9Ð9Ñ9Ø26ÐÐ6Ð6Ð6Ñ6Ø26ÐÐ6Ð6Ð6Ñ6Ø59ÐÐ9Ð9Ð9Ñ9Ø26ÐÐ6Ð6Ð6Ñ6Ð6Ð6r   rW   c                  óZ   — e Zd ZU dZdZded<   dZded<   dZded<   dZded	<   dZ	ded
<   dS )Ú"TFSequenceClassifierOutputWithPastaÓ  
    Base class for outputs of sentence classification models.

    Args:
        loss (`tf.Tensor` of shape `(batch_size, )`, *optional*, returned when `labels` is provided):
            Classification (or regression if config.num_labels==1) loss.
        logits (`tf.Tensor` of shape `(batch_size, config.num_labels)`):
            Classification (or regression if config.num_labels==1) scores (before SoftMax).
        past_key_values (`list[tf.Tensor]`, *optional*, returned when `use_cache=True` is passed or when `config.use_cache=True`):
            List of `tf.Tensor` of length `config.n_layers`, with each tensor of shape `(2, batch_size, num_heads,
            sequence_length, embed_size_per_head)`).

            Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
            `past_key_values` input) to speed up sequential decoding.
        hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings + one for the output of each layer) of shape
            `(batch_size, sequence_length, hidden_size)`.

            Hidden-states of the model at the output of each layer plus the initial embedding outputs.
        attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
            heads.
    Nr	   r2   r3   r    r!   r   r   r   r8   r   r   r   rY   rY   ƒ  r9   r   rY   c                  ó>   — e Zd ZU dZdZded<   dZded<   dZded<   dS )Ú&TFImageClassifierOutputWithNoAttentiona_  
    Base class for outputs of image classification models.

    Args:
        loss (`tf.Tensor` of shape `(1,)`, *optional*, returned when `labels` is provided):
            Classification (or regression if config.num_labels==1) loss.
        logits (`tf.Tensor` of shape `(batch_size, config.num_labels)`):
            Classification (or regression if config.num_labels==1) scores (before SoftMax).
        hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings, if the model has an embedding layer, + one for
            the output of each stage) of shape `(batch_size, num_channels, height, width)`. Hidden-states (also called
            feature maps) of the model at the output of each stage.
    Nr	   r2   r3   r   r   rK   r   r   r   r[   r[   §  sQ   € € € € € € ðð ð "€DÐ!Ð!Ð!Ñ!Ø#€FÐ#Ð#Ð#Ñ#Ø26€MÐ6Ð6Ð6Ñ6Ð6Ð6r   r[   c                  ób   — e Zd ZU dZdZded<   dZded<   dZded<   dZded<   e	d	„ ¦   «         Z
dS )
ÚTFMaskedImageModelingOutputaÕ  
    Base class for outputs of masked image completion / in-painting models.

    Args:
        loss (`tf.Tensor` of shape `(1,)`, *optional*, returned when `bool_masked_pos` is provided):
            Reconstruction loss.
        reconstruction (`tf.Tensor` of shape `(batch_size, num_channels, height, width)`):
           Reconstructed / completed images.
        hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when
        `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings, if the model has an embedding layer, + one for
            the output of each stage) of shape `(batch_size, sequence_length, hidden_size)`. Hidden-states (also called
            feature maps) of the model at the output of each stage.
        attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when
        `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, patch_size, sequence_length)`.
            Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
            heads.
    Nr	   r2   Úreconstructionr   r   r   c                óD   — t          j        dt          ¦  «         | j        S )Nzžlogits attribute is deprecated and will be removed in version 5 of Transformers. Please use the reconstruction attribute to retrieve the final output instead.)ÚwarningsÚwarnÚFutureWarningr^   )Úselfs    r   r3   z"TFMaskedImageModelingOutput.logits×  s*   € åŒð]åñ	
ô 	
ð 	
ð
 Ô"Ð"r   )r   r   r   r   r2   r   r^   r   r   Úpropertyr3   r   r   r   r]   r]   ¼  s   € € € € € € ðð ð( "€DÐ!Ð!Ð!Ñ!Ø'+€NÐ+Ð+Ð+Ñ+Ø-1€MÐ1Ð1Ð1Ñ1Ø*.€JÐ.Ð.Ð.Ñ.àð#ð #ñ „Xð#ð #ð #r   r]   )$Ú
__future__r   r`   Údataclassesr   Ú
tensorflowÚtfÚutilsr   r   r   r   r   r   r$   r&   r(   r*   r1   r7   r;   r=   r?   rB   rD   rF   rH   rJ   rM   rO   rQ   rS   rW   rY   r[   r]   r   r   r   ú<module>rj      s  ðð #Ð "Ð "Ð "Ð "Ð "à €€€Ø !Ð !Ð !Ð !Ð !Ð !à Ð Ð Ð à Ð Ð Ð Ð Ð ð ð/ð /ð /ð /ð /˜ñ /ô /ñ „ð/ð2 ð7ð 7ð 7ð 7ð 7 {ñ 7ô 7ñ „ð7ð$ ð/ð /ð /ð /ð / ;ñ /ô /ñ „ð/ðB ð7ð 7ð 7ð 7ð 7°ñ 7ô 7ñ „ð7ð* ð,5ð ,5ð ,5ð ,5ð ,5°[ñ ,5ô ,5ñ „ð,5ð^ ð /ð  /ð  /ð  /ð  / ñ  /ô  /ñ „ð /ðF ð5ð 5ð 5ð 5ð 5¨;ñ 5ô 5ñ „ð5ð@ ð'5ð '5ð '5ð '5ð '5°+ñ '5ô '5ñ „ð'5ðT ð87ð 87ð 87ð 87ð 87˜;ñ 87ô 87ñ „ð87ðv ð/ð /ð /ð /ð /�{ñ /ô /ñ „ð/ð8 ð /ð  /ð  /ð  /ð  /˜{ñ  /ô  /ñ „ð /ðF ð'5ð '5ð '5ð '5ð '5¨+ñ '5ô '5ñ „ð'5ðT ð/ð /ð /ð /ð /�{ñ /ô /ñ „ð/ð8 ð77ð 77ð 77ð 77ð 77˜ñ 77ô 77ñ „ð77ðt ð/ð /ð /ð /ð / Kñ /ô /ñ „ð/ð: ð/ð /ð /ð /ð / ñ /ô /ñ „ð/ð8 ð47ð 47ð 47ð 47ð 47¨ñ 47ô 47ñ „ð47ðn ð!/ð !/ð !/ð !/ð !/ ñ !/ô !/ñ „ð!/ðH ð2ð 2ð 2ð 2ð 2¨{ñ 2ô 2ñ „ð2ð< ð/ð /ð /ð /ð /˜kñ /ô /ñ „ð/ð4 ð/ð /ð /ð /ð / +ñ /ô /ñ „ð/ð< ð/ð /ð /ð /ð /˜kñ /ô /ñ „ð/ð8 ð/ð /ð /ð /ð / [ñ /ô /ñ „ð/ð> ð37ð 37ð 37ð 37ð 37¨Kñ 37ô 37ñ „ð37ðl ð /ð  /ð  /ð  /ð  /¨ñ  /ô  /ñ „ð /ðF ð7ð 7ð 7ð 7ð 7¨[ñ 7ô 7ñ „ð7ð( ð!#ð !#ð !#ð !#ð !# +ñ !#ô !#ñ „ð!#ð !#ð !#r   