code: def __init__(self, in_channels, *args, **kwargs):
      super(MaskedChannelAttention, self).__init__()
      self.global_max_pool = MaskedGlobalMaxPool2d()
      self.global_avg_pool = FastGlobalAvgPool2d()
  
      intermediate_channels_count = max(in_channels // 16, 8)
      self.attention_transform = nn.Sequential(
          nn.Linear(3 * in_channels, intermediate_channels_count),
          nn.ReLU(inplace=True),
          nn.Linear(intermediate_channels_count, in_channels),
          nn.Sigmoid(),
      )
  
imports: import torch
  import torch.nn
label_desc: Use image node_id 1 to create a new MaskedChannelAttention object from inherited base classes: nn with example: obj = MaskedChannelAttention(in_channels)