def _forward(self, x, y):
    (b, c, *spatial) = x.shape
    x = x.reshape(b, c, (- 1))
    qkv = self.qkv(self.norm(x))
    if hasattr(self, 'adjust_kv_dim'):
        y = self.adjust_kv_dim(y)
    h = self.attention(qkv, y=y)
    h = self.dropout(self.proj_out(h))
    return (x + h).reshape(b, c, *spatial)
def _forward(self, x, y):
    (b, c, *spatial) = x.shape
    x = x.reshape(b, c, (- 1))
    qkv = self.qkv(self.norm(x))
    if hasattr(self, 'adjust_kv_dim'):
        y = self.adjust_kv_dim(y)
    h = self.attention(qkv, y=y)
    h = self.dropout(self.proj_out(h))
    return (x + h).reshape(b, c, *spatial)