revert 49a96b90 due to conflicts during training

This commit is contained in:
Lincoln Stein 2022-09-12 14:34:36 -04:00
parent 7dee9efb24
commit bf1beaa607

View File

@ -297,9 +297,9 @@ class BasicTransformerBlock(nn.Module):
def _forward(self, x, context=None):
x = x.contiguous() if x.device.type == 'mps' else x
x += self.attn1(self.norm1(x))
x += self.attn2(self.norm2(x), context=context)
x += self.ff(self.norm3(x))
x = self.attn1(self.norm1(x)) + x
x = self.attn2(self.norm2(x), context=context) + x
x = self.ff(self.norm3(x)) + x
return x