Update model.py

This commit is contained in:
Alireza Davoudi 2022-09-05 21:06:05 +04:30 committed by GitHub
parent f9bc83733b
commit f77e7c2467
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -159,7 +159,7 @@ class LayerNorm(nn.LayerNorm):
def forward(self, x: torch.Tensor):
orig_type = x.dtype
ret = super(LayerNorm).forward(x.type(torch.float32))
ret = super(LayerNorm, self).forward(x.type(torch.float32))
return ret.type(orig_type)