class_docstr: Implements a video+text single-tower backbone.
  
  Attributes:
    num_classes: Number of output classes.
    video_tower_config: The config of the video tower.
    text_tower_config: The config of the text tower.
    video_text_fusion_config: The config of video+text fusion.
    classifier: 'gap' or 'token'
class_docstr_tok: ["Implements","a","video+text","single-tower","backbone",".","Attributes",":","num_classes",":","Number","of","output","classes",".","video_tower_config",":","The","config","of","the","video","tower",".","text_tower_config",":","The","config","of","the","text","tower",".","video_text_fusion_config",":","The","config","of","video+text","fusion",".","classifier",":","'gap","'","or","'token","'"]
docstr: Fuses video and text tokens.
  
  Args:
    video_tokens: A 3D float tensor of shape (batch_size, sequence_length,
      channels) representing the image tokens.
    text_tokens: A 3D float tensor of shape (num_classes, sequence_length,
      channels) representing the text tokens.
    task: 'action_segmentation', classification', 'temporal_localization',
      'moment_retrieval' or 'highlight_detection'.
    input_word_ids: A 2D int tensor of shape (num_classes, sequence_length)
      representing the input word indices.
    text_input_mask: A 2D binary tensor of shape (batch_size, sequence_length)
      representing the mask of the text inputs.
    video_input_mask: A 2D binary tensor of shape (batch_size,
      sequence_length) representing the mask of the video inputs.
    train: Whether or not the model is under training.
    debug: Whether or not it is in debug mode.
  
  Returns:
    A 3D float tensor of shape (batch_size, num_classes, channels).
  
  Raises:
    ValueError if video_text_fusion_config.type is not supported.
docstr_tok: ["Fuses","video","and","text","tokens",".","Args",":","video_tokens",":","A","3D","float","tensor","of","shape","(","batch_size",",","sequence_length",",","channels",")","representing","the","image","tokens",".","text_tokens",":","A","3D","float","tensor","of","shape","(","num_classes",",","sequence_length",",","channels",")","representing","the","text","tokens",".","task",":","'action_segmentation","'",",","classification","'",",","'temporal_localization","'",",","'moment_retrieval","'","or","'highlight_detection","'",".","input_word_ids",":","A","2D","int","tensor","of","shape","(","num_classes",",","sequence_length",")","representing","the","input","word","indices",".","text_input_mask",":","A","2D","binary","tensor","of","shape","(","batch_size",",","sequence_length",")","representing","the","mask","of","the","text","inputs",".","video_input_mask",":","A","2D","binary","tensor","of","shape","(","batch_size",",","sequence_length",")","representing","the","mask","of","the","video","inputs",".","train",":","Whether","or","not","the","model","is","under","training",".","debug",":","Whether","or","not","it","is","in","debug","mode",".","Returns",":","A","3D","float","tensor","of","shape","(","batch_size",",","num_classes",",","channels",")",".","Raises",":","ValueError","if","video_text_fusion_config.type","is","not","supported","."]
code: def fuse_video_text(
      self,
      video_tokens: jnp.ndarray,
      text_tokens: jnp.ndarray,
      task: str,
      input_word_ids: Optional[jnp.ndarray] = None,
      text_input_mask: Optional[jnp.ndarray] = None,
      video_input_mask: Optional[jnp.ndarray] = None,
      train: bool = True,
      debug: bool = False,
  ) -> jnp.ndarray:
      """Fuses video and text tokens.
  
      Args:
        video_tokens: A 3D float tensor of shape (batch_size, sequence_length,
          channels) representing the image tokens.
        text_tokens: A 3D float tensor of shape (num_classes, sequence_length,
          channels) representing the text tokens.
        task: 'action_segmentation', classification', 'temporal_localization',
          'moment_retrieval' or 'highlight_detection'.
        input_word_ids: A 2D int tensor of shape (num_classes, sequence_length)
          representing the input word indices.
        text_input_mask: A 2D binary tensor of shape (batch_size, sequence_length)
          representing the mask of the text inputs.
        video_input_mask: A 2D binary tensor of shape (batch_size,
          sequence_length) representing the mask of the video inputs.
        train: Whether or not the model is under training.
        debug: Whether or not it is in debug mode.
  
      Returns:
        A 3D float tensor of shape (batch_size, num_classes, channels).
  
      Raises:
        ValueError if video_text_fusion_config.type is not supported.
      """
      video_tokens, text_tokens = self.fusion_model(
          video_tokens,
          text_tokens,
          task,
          input_word_ids,
          text_input_mask,
          video_input_mask,
          train,
      )
      return self.head_models[task](
          video_tokens, text_tokens, task, train
      )
  
imports: from typing import Any, Dict, Optional
  import flax.linen
  import jax
  import jax.numpy
  import ml_collections
  from scenic.projects.unloc import action_segmentation_base_model
  from scenic.projects.unloc import encoders
  from scenic.projects.unloc import heads
  from scenic.projects.unloc import moment_retrieval_base_model
  from scenic.projects.unloc import temporal_localization_base_model
  from scenic.projects.unloc import video_text_fusion
label_desc: Use image node_id 2 for calling the VideoTextSingleTower obj's underlying member method code with example usage: obj.fuse_video_text(video_tokens, text_tokens, task, input_word_ids, text_input_mask, video_input_mask, train, debug) and returns: self