def __init__(self, seq_len, d_model, attn=True):
    super(SpatialGatingUnit, self).__init__()
    self.layer_norm = nn.LayerNorm((d_model // 2))
    self.spatial = nn.Conv1d(seq_len, seq_len, kernel_size=1)
    self.is_attn = attn
    if self.is_attn:
        self.attn = TinyAttention(d_model)
def __init__(self, seq_len, d_model, attn=True):
    super(SpatialGatingUnit, self).__init__()
    self.layer_norm = nn.LayerNorm((d_model // 2))
    self.spatial = nn.Conv1d(seq_len, seq_len, kernel_size=1)
    self.is_attn = attn
    if self.is_attn:
        self.attn = TinyAttention(d_model)