code: def __init__(self, inplanes=(1024, 2048), planes=2048):
      super(SpatialModulation, self).__init__()
  
      self.spatial_modulation = nn.ModuleList()
      for _, dim in enumerate(inplanes):
          op = nn.ModuleList()
          ds_factor = planes // dim
          ds_num = int(np.log2(ds_factor))
          if ds_num < 1:
              op = Identity()
          else:
              for dsi in range(ds_num):
                  in_factor = 2**dsi
                  out_factor = 2 ** (dsi + 1)
                  op.append(
                      ConvModule(
                          dim * in_factor,
                          dim * out_factor,
                          kernel_size=(1, 3, 3),
                          stride=(1, 2, 2),
                          padding=(0, 1, 1),
                          bias=False,
                      )
                  )
          self.spatial_modulation.append(op)
  
imports: import numpy
  import torch
  import torch.nn
  import torch.utils.checkpoint
  import torch.nn.functional
label_desc: Use image node_id 1 to create a new SpatialModulation object from inherited base classes: nn with example: obj = SpatialModulation(inplanes, planes)