class_docstr: Vivit Embeddings.
  
  Creates embeddings from a video using VivitTubeletEmbeddings, adds CLS token and positional embeddings.
class_docstr_tok: ["Vivit","Embeddings",".","Creates","embeddings","from","a","video","using","VivitTubeletEmbeddings",",","adds","CLS","token","and","positional","embeddings","."]
code: def forward(self, pixel_values):
      batch_size = pixel_values.shape[0]
      embeddings = self.patch_embeddings(pixel_values)
  
      cls_tokens = self.cls_token.tile([batch_size, 1, 1])
  
      embeddings = torch.cat((cls_tokens, embeddings), dim=1)
  
      # add positional encoding to each token
      embeddings = embeddings + self.position_embeddings
  
      embeddings = self.dropout(embeddings)
  
      return embeddings
  
imports: import math
  from typing import Optional, Set, Tuple, Union
  import torch
  import torch.utils.checkpoint
  from torch import nn
  from torch.nn import CrossEntropyLoss, MSELoss
  from ...activations import ACT2FN
  from ...modeling_outputs import BaseModelOutput, BaseModelOutputWithPooling, ImageClassifierOutput
  from ...modeling_utils import PreTrainedModel
  from ...pytorch_utils import find_pruneable_heads_and_indices, prune_linear_layer
  from ...utils import add_start_docstrings, add_start_docstrings_to_model_forward, logging, replace_return_docstrings
  from .configuration_vivit import VivitConfig
label_desc: Use image node_id 2 for calling the VivitEmbeddings obj's underlying member method code with example usage: obj.forward(pixel_values) and returns: embeddings