Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion segmentation_models_pytorch/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.5.0"
__version__ = "0.5.1"
2 changes: 1 addition & 1 deletion segmentation_models_pytorch/losses/_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def focal_loss_with_logits(
References:
https://github.com/open-mmlab/mmdetection/blob/master/mmdet/core/loss/losses.py
"""
target = target.type(output.type())
target = target.to(dtype=output.dtype, device=output.device)

logpt = F.binary_cross_entropy_with_logits(output, target, reduction="none")
pt = torch.exp(-logpt)
Expand Down