code: def __init__(
      self,
      in_channels,
      stride,
      reduce_ratio,
      norm_type="bn",
      freeze_norm=False,
      norm_decay=0.0,
  ):
      super(ConditionalChannelWeightingBlock, self).__init__()
      assert stride in [1, 2]
      branch_channels = [channel // 2 for channel in in_channels]
  
      self.cross_resolution_weighting = CrossResolutionWeightingModule(
          branch_channels,
          ratio=reduce_ratio,
          norm_type=norm_type,
          freeze_norm=freeze_norm,
          norm_decay=norm_decay,
      )
      self.depthwise_convs = nn.LayerList(
          [
              ConvNormLayer(
                  channel,
                  channel,
                  filter_size=3,
                  stride=stride,
                  groups=channel,
                  norm_type=norm_type,
                  freeze_norm=freeze_norm,
                  norm_decay=norm_decay,
              )
              for channel in branch_channels
          ]
      )
  
      self.spatial_weighting = nn.LayerList(
          [
              SpatialWeightingModule(
                  channel,
                  ratio=4,
                  freeze_norm=freeze_norm,
                  norm_decay=norm_decay,
              )
              for channel in branch_channels
          ]
      )
  
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  from numbers import Integral
  from paddle import ParamAttr
  from paddle.regularizer import L2Decay
  from paddle.nn.initializer import Normal, Constant
  from ppdet.core.workspace import register
  from ppdet.modeling.shape_spec import ShapeSpec
  from ppdet.modeling.ops import channel_shuffle
  from ..None import layers
label_desc: Use image node_id 1 to create a new ConditionalChannelWeightingBlock object from inherited base classes: nn with example: obj = ConditionalChannelWeightingBlock(in_channels, stride, reduce_ratio, norm_type, freeze_norm, norm_decay)