Merge branch 'lstein:main' into main

This commit is contained in:
Armando C. Santisbon 2022-09-10 14:05:25 -05:00 committed by GitHub
commit 0ca9d1f228
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -235,9 +235,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
x = self.attn2(self.norm2(x), context=context) + x
x = self.ff(self.norm3(x)) + x
x += self.attn1(self.norm1(x))
x += self.attn2(self.norm2(x), context=context)
x += self.ff(self.norm3(x))
return x