merge deepspeed

This commit is contained in:
Sotirios Anagnostidis
2023-01-06 21:28:26 +01:00
parent f2b125cbe3
commit 88ee3b3264
7 changed files with 181 additions and 132 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ class CrossEntropyLoss(nn.CrossEntropyLoss):
def forward(self, input, target, mask=None):
if mask is not None:
mask = mask.view(-1)
mask = mask.view(-1).bool()
input = input.view(-1, input.size(-1))
target = target.view(-1)
input = input[mask]