def forward(self, x):
    if self.is_attn:
        shortcut = x
        shortcut = self.attn(shortcut)
    (u, v) = torch.chunk(x, 2, dim=(- 1))
    v = self.layer_norm(v)
    v = self.spatial(v)
    if self.is_attn:
        v += shortcut
    return (u * v)
def forward(self, x):
    if self.is_attn:
        shortcut = x
        shortcut = self.attn(shortcut)
    (u, v) = torch.chunk(x, 2, dim=(- 1))
    v = self.layer_norm(v)
    v = self.spatial(v)
    if self.is_attn:
        v += shortcut
    return (u * v)