class_docstr: T5 model consisting of encoder and decoder transformers.
  
  This class simply wraps network.Transformer class in t5x.examples.t5.
  
  Attributes:
    vocab_size: Size of the vocabulary.
    emb_dim: Size of the embeddings.
    num_heads: Number of attention heads.
    num_encoder_layers: Number of encoder layers.
    num_decoder_layers: Number of decoder layers.
    head_dim: Size of the embeddings in each head.
    mlp_dim: Size of the MLP output embeddings.
    dropout_rate: Dropout rate.
    dtype: Data type.
    mlp_activations: Sequence of activations in MLP.
    logits_via_embedding: Use the embedding weights for computing logits.
docstr: Applies T5 model on the inputs.
  
  This method requires both decoder_target_tokens and decoder_input_tokens,
  which is a shifted version of the former. For a packed dataset, it usually
  has additional processing applied. For example, the first element of each
  sequence has id 0 instead of the shifted EOS id from the previous sequence.
  
  Args:
    encoder_input_tokens: input data to the encoder.
    decoder_input_tokens: input token to the decoder.
    decoder_target_tokens: target token to the decoder.
    encoder_segment_ids: encoder segmentation info for packed examples.
    decoder_segment_ids: decoder segmentation info for packed examples.
    encoder_positions: encoder subsequence positions for packed examples.
    decoder_positions: decoder subsequence positions for packed examples.
    enable_dropout: Ensables dropout if set to True.
    decode: Whether to prepare and use an autoregressive cache.
  
  Returns:
    logits array from full transformer.
docstr_tok: ["Applies","T5","model","on","the","inputs",".","This","method","requires","both","decoder_target_tokens","and","decoder_input_tokens",",","which","is","a","shifted","version","of","the","former",".","For","a","packed","dataset",",","it","usually","has","additional","processing","applied",".","For","example",",","the","first","element","of","each","sequence","has","id","0","instead","of","the","shifted","EOS","id","from","the","previous","sequence",".","Args",":","encoder_input_tokens",":","input","data","to","the","encoder",".","decoder_input_tokens",":","input","token","to","the","decoder",".","decoder_target_tokens",":","target","token","to","the","decoder",".","encoder_segment_ids",":","encoder","segmentation","info","for","packed","examples",".","decoder_segment_ids",":","decoder","segmentation","info","for","packed","examples",".","encoder_positions",":","encoder","subsequence","positions","for","packed","examples",".","decoder_positions",":","decoder","subsequence","positions","for","packed","examples",".","enable_dropout",":","Ensables","dropout","if","set","to","True",".","decode",":","Whether","to","prepare","and","use","an","autoregressive","cache",".","Returns",":","logits","array","from","full","transformer","."]
code: def __call__(
      self,
      encoder_input_tokens: jnp.ndarray,
      decoder_input_tokens: jnp.ndarray,
      decoder_target_tokens: jnp.ndarray,
      encoder_segment_ids: Optional[jnp.ndarray] = None,
      decoder_segment_ids: Optional[jnp.ndarray] = None,
      encoder_positions: Optional[jnp.ndarray] = None,
      decoder_positions: Optional[jnp.ndarray] = None,
      *,
      enable_dropout: bool = True,
      decode: bool = False,
  ):
      """Applies T5 model on the inputs.
  
      This method requires both decoder_target_tokens and decoder_input_tokens,
      which is a shifted version of the former. For a packed dataset, it usually
      has additional processing applied. For example, the first element of each
      sequence has id 0 instead of the shifted EOS id from the previous sequence.
  
      Args:
        encoder_input_tokens: input data to the encoder.
        decoder_input_tokens: input token to the decoder.
        decoder_target_tokens: target token to the decoder.
        encoder_segment_ids: encoder segmentation info for packed examples.
        decoder_segment_ids: decoder segmentation info for packed examples.
        encoder_positions: encoder subsequence positions for packed examples.
        decoder_positions: decoder subsequence positions for packed examples.
        enable_dropout: Ensables dropout if set to True.
        decode: Whether to prepare and use an autoregressive cache.
  
      Returns:
        logits array from full transformer.
      """
      return self.t5_module(
          encoder_input_tokens,
          decoder_input_tokens,
          decoder_target_tokens,
          encoder_segment_ids,
          decoder_segment_ids,
          encoder_positions,
          decoder_positions,
          enable_dropout=enable_dropout,
          decode=decode,
      )
  
imports: import functools
  from typing import Any, Dict, Mapping, Optional, Sequence, Tuple
  import flax.linen
  import jax
  import jax.numpy
  from scenic.model_lib.base_models import base_model
  from t5x import decoding
  from t5x.examples.t5 import layers
  from t5x.examples.t5 import network
  from t5x.models import DecodeFnCallable
label_desc: Use image node_id 4 for calling the T5 obj's underlying member method code with example usage: obj.__call__(encoder_input_tokens, decoder_input_tokens, decoder_target_tokens, encoder_segment_ids, decoder_segment_ids, encoder_positions, decoder_positions) and returns: self