Update model.py

This commit is contained in:
Alireza Davoudi 2022-09-05 21:00:09 +04:30 committed by GitHub
parent d50d76daa6
commit f9bc83733b
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().forward(x.type(torch.float32))
ret = super(LayerNorm).forward(x.type(torch.float32))
return ret.type(orig_type)