code: def __init__(self, in_channels, norm_layer, activation, mid_k=2.0):
      super(SpatialSeparatedAttention, self).__init__()
      self.background_gate = ChannelAttention(in_channels)
      self.foreground_gate = ChannelAttention(in_channels)
      self.mix_gate = ChannelAttention(in_channels)
  
      mid_channels = int(mid_k * in_channels)
      self.learning_block = nn.Sequential(
          ConvBlock(
              in_channels,
              mid_channels,
              kernel_size=3,
              stride=1,
              padding=1,
              norm_layer=norm_layer,
              activation=activation,
              bias=False,
          ),
          ConvBlock(
              mid_channels,
              in_channels,
              kernel_size=3,
              stride=1,
              padding=1,
              norm_layer=norm_layer,
              activation=activation,
              bias=False,
          ),
      )
      self.mask_blurring = GaussianSmoothing(1, 7, 1, padding=3)
  
file_path: carefree-learn/cflearn/api/cv/third_party/iharm/model/base/ssam_model.py
imports: import torch
  from functools import partial
  from torch import nn
  from ..ops import ChannelAttention
  from ..modeling.unet import UNetDecoder
  from ..modeling.unet import UNetEncoder
  from ..modeling.basic_blocks import ConvBlock
  from ..modeling.basic_blocks import GaussianSmoothing
label_desc: Use image node_id 1 to create a new SpatialSeparatedAttention object from inherited base classes: nn with example: obj = SpatialSeparatedAttention(in_channels, norm_layer, activation, mid_k)