Merge branch 'development' into development

This commit is contained in:
Peter Baylies
2022-09-12 10:37:49 -04:00
committed by GitHub
3 changed files with 9 additions and 7 deletions

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