code: def __init__(self, dim, shrinkage_rate=0.25):
      super().__init__()
      hidden_dim = int(dim * shrinkage_rate)
  
      self.gate = nn.Sequential(
          Reduce("b c h w -> b c", "mean"),
          nn.Linear(dim, hidden_dim, bias=False),
          nn.SiLU(),
          nn.Linear(hidden_dim, dim, bias=False),
          nn.Sigmoid(),
          Rearrange("b c -> b c 1 1"),
      )
  
imports: from functools import partial
  import torch
  from torch import nn, einsum
  from einops import rearrange, repeat
  from einops.layers.torch import Rearrange, Reduce
label_desc: Use image node_id 1 to create a new SqueezeExcitation object from inherited base classes: nn with example: obj = SqueezeExcitation(dim, shrinkage_rate)