docstr: Test complex ResNetBasicStem.
docstr_tok: ["Test","complex","ResNetBasicStem","."]
code: def test_create_complex_stem(self):
      """
      Test complex ResNetBasicStem.
      """
      for input_dim, output_dim in itertools.product(
          (2, 3), (4, 8, 16)
      ):
          model = ResNetBasicStem(
              conv=nn.Conv3d(
                  input_dim,
                  output_dim,
                  kernel_size=[3, 7, 7],
                  stride=[1, 2, 2],
                  padding=[1, 3, 3],
                  bias=False,
              ),
              norm=nn.BatchNorm3d(output_dim),
              activation=nn.ReLU(),
              pool=nn.MaxPool3d(
                  kernel_size=[1, 3, 3],
                  stride=[1, 2, 2],
                  padding=[0, 1, 1],
              ),
          )
  
          # Test forwarding.
          for input_tensor in TestResNetBasicStem._get_inputs(
              input_dim
          ):
              if input_tensor.shape[1] != input_dim:
                  with self.assertRaises(Exception):
                      output_tensor = model(input_tensor)
                  continue
              else:
                  output_tensor = model(input_tensor)
  
              input_shape = input_tensor.shape
              output_shape = output_tensor.shape
  
              output_shape_gt = (
                  input_shape[0],
                  output_dim,
                  input_shape[2],
                  (((input_shape[3] - 1) // 2 + 1) - 1) // 2 + 1,
                  (((input_shape[4] - 1) // 2 + 1) - 1) // 2 + 1,
              )
  
              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_models_stem.py
imports: import itertools
  import unittest
  import numpy
  import torch
  from pytorchvideo.layers.convolutions import ConvReduce3D
  from pytorchvideo.models.stem import create_acoustic_res_basic_stem, create_res_basic_stem, ResNetBasicStem
  from torch import nn
label_desc: Use image node_id 4 for calling the TestResNetBasicStem obj's underlying member method code with example usage: obj.test_create_complex_stem() without return types