class_docstr: Concat ViT temporal encodings with T5 text encodings.
code: def setup(self):
      self.visual_encoder = vit.Encoder(
          mlp_dim=self.enc_config.get("dim", 2048),
          num_layers=self.enc_config.get("layers", 12),
          num_heads=self.enc_config.get("heads", 12),
          positional_embedding=self.enc_config.get(
              "pos_embed", "learned_1d"
          ),
          dropout_rate=self.enc_config.get("dropout_rate", 0.0),
          attention_dropout_rate=self.enc_config.get(
              "dropout_rate", 0.0
          ),
          stochastic_depth=self.enc_config.get("stochastic_depth", 0.0),
      )
      enc_cfg = self.enc_config.get("pretrained_config", "t5_1_1_base")
      t5_config = t5_pretrained.CONFIGS[enc_cfg]
      t5_config["dropout_rate"] = self.enc_config.get(
          "t5_dropout_rate", 0.0
      )
      if self.num_bins:  # add time tokens to the vocabulary
          t5_config["vocab_size"] = 32128 + self.num_bins
      self.t5_encoder = t5_model.T5Encoder(
          **t5_config,
          shared_embedding=self.embedder,
          name="video_encoder",
      )
      self.proj_dim = 768
      if enc_cfg == "t5_1_1_large":
          self.proj_dim = 1024
          self.proj = nn.Dense(
              self.proj_dim,
              dtype=self.t5_encoder.dtype,
              name="vis_to_text",
          )
      elif enc_cfg == "t5_1_1_small":
          self.proj_dim = 512
          self.proj = nn.Dense(
              self.proj_dim,
              dtype=self.t5_encoder.dtype,
              name="vis_to_text",
          )
  
imports: import functools
  from typing import Any, Dict, Mapping, Optional, Tuple
  from absl import logging
  import flax.linen
  from flax.training import common_utils
  import jax
  import jax.numpy
  import ml_collections
  from scenic.model_lib.base_models import base_model
  from scenic.model_lib.base_models import model_utils
  from scenic.projects.baselines import vit
  from scenic.projects.t5 import layers
  from scenic.projects.t5 import model
  from t5x import decoding
  from t5x.models import DecodeFnCallable
label_desc: Use image node_id 1 for calling the CatEncoder obj's underlying member method code with example usage: obj.setup() without return types