docstr: Args:
      x (dict or torch.Tensor): video input.
          When its type is dict, the dataset is a video dataset, and its
          content is like {"video": torch.tensor, "audio": torch.tensor}.
          When its type is torch.Tensor, the dataset is an image dataset.
docstr_tok: ["Args",":","x","(","dict","or","torch.Tensor",")",":","video","input",".","When","its","type","is","dict",",","the","dataset","is","a","video","dataset",",","and","its","content","is","like","{","``","video","''",":","torch.tensor",",","``","audio","''",":","torch.tensor","}",".","When","its","type","is","torch.Tensor",",","the","dataset","is","an","image","dataset","."]
code: def forward(self, x):
      """
      Args:
          x (dict or torch.Tensor): video input.
              When its type is dict, the dataset is a video dataset, and its
              content is like {"video": torch.tensor, "audio": torch.tensor}.
              When its type is torch.Tensor, the dataset is an image dataset.
      """
      assert isinstance(x, dict) or isinstance(
          x, torch.Tensor
      ), "x must be either a dictionary or a torch.Tensor"
      if isinstance(x, dict):
          assert self._input_key is not None and self._input_key in x, (
              "input key (%s) not in the input" % self._input_key
          )
          x = x[self._input_key]
      else:
          assert (
              self._input_key is None
          ), "when input of forward pass is a tensor, input key should not be set"
          assert (
              x.dim() == 4 or x.dim() == 5
          ), "tensor x must be 4D/5D tensor"
          if x.dim() == 4:
              # x is a 4D tensor of size N x C x H x W and is prepared from an
              # image dataset. We insert a temporal axis make it 5D of size
              # N x C x T x H x W
              x = torch.unsqueeze(x, 2)
  
      out = self.stem([x])
      out = self.stages(out)
  
      return out
  
imports: import logging
  from typing import Any, Dict, Sequence
  import torch
  import torch.nn
  from classy_vision.generic.util import is_pos_int, is_pos_int_list
  from .None import register_model
  from .classy_model import ClassyModel
  from .resnext3d_stage import ResStage
  from .resnext3d_stem import R2Plus1DStem, ResNeXt3DStem
label_desc: Use image node_id 5 for calling the ResNeXt3DBase obj's underlying member method code with example usage: obj.forward(x) and returns: out