docstr: To test different versions, set the (expansion, clip_length, crop_size) to:
  X3D-XS: ("XS", 4, 160)
  X3D-S: ("S", 13, 160)
  X3D-M: ("M", 16, 224)
  X3D-L: ("L", 16, 312)
docstr_tok: ["To","test","different","versions",",","set","the","(","expansion",",","clip_length",",","crop_size",")","to",":","X3D-XS",":","(","``","XS","''",",","4",",","160",")","X3D-S",":","(","``","S","''",",","13",",","160",")","X3D-M",":","(","``","M","''",",","16",",","224",")","X3D-L",":","(","``","L","''",",","16",",","312",")"]
code: def test_create_x3d(self):
      """
      To test different versions, set the (expansion, clip_length, crop_size) to:
      X3D-XS: ("XS", 4, 160)
      X3D-S: ("S", 13, 160)
      X3D-M: ("M", 16, 224)
      X3D-L: ("L", 16, 312)
      """
      for (
          expansion,
          input_clip_length,
          input_crop_size,
      ) in [
          ("XS", 4, 160),
      ]:
          model = create_x3d(expansion=expansion)
  
          # Test forwarding.
          for tensor in TestEfficientX3d._get_inputs(
              input_clip_length, input_crop_size
          ):
              if tensor.shape[1] != 3:
                  with self.assertRaises(RuntimeError):
                      out = model(tensor)
                  continue
  
              out = model(tensor)
  
              output_shape = out.shape
              output_shape_gt = (tensor.shape[0], 400)
  
              self.assertEqual(
                  output_shape,
                  output_shape_gt,
                  "Output shape {} is different from expected shape {}".format(
                      output_shape, output_shape_gt
                  ),
              )
  
file_path: pytorchvideo/tests/test_accelerator_models_efficient_x3d.py
imports: import os
  import unittest
  import torch
  from pytorchvideo.models.accelerator.mobile_cpu.efficient_x3d import create_x3d
label_desc: Use image node_id 2 for calling the TestEfficientX3d obj's underlying member method code with example usage: obj.test_create_x3d() without return types