Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
remove functional call from sigmoid and softmax (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarriba authored Apr 29, 2021
1 parent b275d8b commit 2b39eae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flash/core/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ def __init__(

def to_metrics_format(self, x: torch.Tensor) -> torch.Tensor:
if getattr(self.hparams, "multi_label", False):
return F.sigmoid(x)
return F.softmax(x, -1)
return torch.sigmoid(x)
return torch.softmax(x, -1)


class ClassificationSerializer(Serializer):
Expand Down

0 comments on commit 2b39eae

Please sign in to comment.