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.
code: def encode(
      self,
      encoder_input_tokens: jnp.ndarray,
      encoder_segment_ids: Optional[jnp.ndarray] = None,
      enable_dropout: bool = True,
  ):
      return self.t5_module.encode(
          encoder_input_tokens, encoder_segment_ids, enable_dropout
      )
  
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 2 for calling the T5 obj's underlying member method code with example usage: obj.encode(encoder_input_tokens, encoder_segment_ids, enable_dropout) and returns: self