class_docstr: MTV model.
docstr: Prepends CLS token.
  
  Args:
    x: A 3D float tensor of shape (batch, sequence_len, channels) representing
      the tokens.
    name: Parameter name of the added CLS token.
  
  Returns:
    A 3D float tensor with prepended CLS token. Its new shape is (batch,
    sequence_len+1, channels).
docstr_tok: ["Prepends","CLS","token",".","Args",":","x",":","A","3D","float","tensor","of","shape","(","batch",",","sequence_len",",","channels",")","representing","the","tokens",".","name",":","Parameter","name","of","the","added","CLS","token",".","Returns",":","A","3D","float","tensor","with","prepended","CLS","token",".","Its","new","shape","is","(","batch",",","sequence_len+1",",","channels",")","."]
code: def _add_cls_token(self, x: jnp.ndarray, name: str) -> jnp.ndarray:
      """Prepends CLS token.
  
      Args:
        x: A 3D float tensor of shape (batch, sequence_len, channels) representing
          the tokens.
        name: Parameter name of the added CLS token.
  
      Returns:
        A 3D float tensor with prepended CLS token. Its new shape is (batch,
        sequence_len+1, channels).
      """
      if self.classifier == "token":
          bs, _, c = x.shape
          cls = self.param(
              name, nn.initializers.zeros, (1, 1, c), x.dtype
          )
          cls = jnp.tile(cls, [bs, 1, 1])
          x = jnp.concatenate([cls, x], axis=1)
      return x
  
imports: import functools
  from typing import Any, List, Sequence, Tuple, Union
  import flax.linen
  import jax
  import jax.numpy
  import ml_collections
  from scenic.model_lib.layers import attention_layers
  from scenic.model_lib.layers import nn_layers
  from scenic.projects.baselines import vit
  from scenic.projects.mtv import model_utils
  from scenic.projects.vivit import model
  from scenic.train_lib import train_utils
label_desc: Use image node_id 1 for calling the MTV obj's underlying member method code with example usage: obj._add_cls_token(x, name) and returns: x