Skip to content

Commit

Permalink
fix edge case (#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeandut authored Jun 12, 2024
1 parent 8799494 commit c7478b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flamby/datasets/fed_synthetic/loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ def __init__(self):
self.ce = torch.nn.CrossEntropyLoss()

def forward(self, input: torch.Tensor, target: torch.Tensor):
return self.ce(input, target.squeeze().long())
return self.ce(input, target.squeeze(axis=1).long())

0 comments on commit c7478b9

Please sign in to comment.