class_docstr: Original CBAM channel attention module, currently avg + max pool variant only.
      
code: def __init__(
      self,
      channels,
      rd_ratio=1.0 / 16,
      rd_channels=None,
      rd_divisor=1,
      act_layer=nn.ReLU,
      gate_layer="sigmoid",
      mlp_bias=False,
  ):
      super(ChannelAttn, self).__init__()
      if not rd_channels:
          rd_channels = make_divisible(
              channels * rd_ratio, rd_divisor, round_limit=0.0
          )
      self.fc1 = nn.Conv2d(channels, rd_channels, 1, bias=mlp_bias)
      self.act = act_layer(inplace=True)
      self.fc2 = nn.Conv2d(rd_channels, channels, 1, bias=mlp_bias)
      self.gate = create_act_layer(gate_layer)
  
imports: import torch
  from torch import nn
  import torch.nn.functional
  from .conv_bn_act import ConvNormAct
  from .create_act import create_act_layer, get_act_layer
  from .helpers import make_divisible
label_desc: Use image node_id 1 to create a new ChannelAttn object from inherited base classes: nn with example: obj = ChannelAttn(channels, rd_ratio, rd_channels, rd_divisor, act_layer, gate_layer, mlp_bias)