Skip to content

Replaced view with replace to prevent errors on non-contiguous tensors #1174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2025

Conversation

simonreise
Copy link
Contributor

Fixes #1163 (error if model predictions tensor is not contiguous)

Copy link

codecov bot commented Jun 5, 2025

Codecov Report

Attention: Patch coverage is 47.61905% with 11 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
segmentation_models_pytorch/losses/lovasz.py 0.00% 5 Missing ⚠️
segmentation_models_pytorch/losses/dice.py 33.33% 4 Missing ⚠️
segmentation_models_pytorch/losses/focal.py 0.00% 2 Missing ⚠️
Files with missing lines Coverage Δ
segmentation_models_pytorch/losses/jaccard.py 73.01% <100.00%> (ø)
segmentation_models_pytorch/losses/mcc.py 100.00% <100.00%> (ø)
segmentation_models_pytorch/losses/focal.py 27.02% <0.00%> (ø)
segmentation_models_pytorch/losses/dice.py 62.68% <33.33%> (ø)
segmentation_models_pytorch/losses/lovasz.py 19.49% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@qubvel
Copy link
Collaborator

qubvel commented Jun 5, 2025

Thanks for the fix!

@qubvel qubvel merged commit bf5ae48 into qubvel-org:main Jun 5, 2025
16 of 17 checks passed
@simonreise simonreise deleted the loss-reshape branch June 5, 2025 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RuntimeError with SegFormer and multilabel FocalLoss
2 participants