Skip to content
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

Fix bug related to SoftDTWLossPytorch with option normalize=True when used on inputs of different lengths #478

Conversation

YannCabanes
Copy link
Contributor

@YannCabanes YannCabanes commented Sep 7, 2023

This PR is related to the issue #473 reporting an error message when SoftDTWLossPytorch with option normalize=True is used on inputs of different lengths.
The bug is coming from the use of torch.cat (https://pytorch.org/docs/stable/generated/torch.cat.html) which impose the lengths of the inputs to be equal. (The shape of the inputs is [batch_size, length, dim].)
The use of torch.cat is removed in this PR.

@codecov-commenter
Copy link

Codecov Report

Patch and project coverage have no change.

Comparison is base (e9b3ecc) 92.87% compared to head (84ab9fd) 92.87%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #478   +/-   ##
=======================================
  Coverage   92.87%   92.87%           
=======================================
  Files          67       67           
  Lines        5641     5641           
=======================================
  Hits         5239     5239           
  Misses        402      402           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@YannCabanes
Copy link
Contributor Author

All checks have passed.

@YannCabanes YannCabanes changed the title Empty commit to test main branch Fix bug related to SoftDTWLossPytorch with option normalize=True when used on inputs of different lengths Sep 7, 2023
@YannCabanes
Copy link
Contributor Author

All checks have passed.

@YannCabanes YannCabanes merged commit a9c5ce3 into tslearn-team:main Sep 7, 2023
11 checks passed
@YannCabanes YannCabanes deleted the fix-softdtwloss-normalized-for-different-lengths branch December 21, 2023 22:14
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.

2 participants