Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
FSD50K Speech Model Fine-tuning Tutorial #201
FSD50K Speech Model Fine-tuning Tutorial #201
Changes from 6 commits
3488fb2
92410db
1e3fb82
f8bce98
f62fea4
b5e9f1e
5482d08
ee62851
78a9672
344c7ab
ee68dfc
5a0b5a0
e63873c
cce4022
a6b0791
b79986f
223d4ce
c8f74fc
9794cfc
1577e9e
22000ef
7aab773
3f5e630
df23aa3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets remove all the ID
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mind use
torchmetrics
functional metrics?https://torchmetrics.readthedocs.io/en/stable/classification/average_precision.html#functional-interface
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the time I wrote the code,
torchmetrics.functional.average_precision
'starget
took "integer labels" therefore not accepting multi-hot labels. Just let me check whether this was fixed and if I get the same results as with scikit-learn!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, the new implementations of
multilabel_average_precision
give the same results as scikit-learnThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use that :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, it looks like you have true values for preds, I'd recommend using
test_step
instead to show the metrics.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean? Something like this?
With
on_step=False, on_epoch=True
to only log the end of the epoch according to https://pytorch-lightning.readthedocs.io/en/stable/extensions/logging.html#logging-from-a-lightningmodule:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then the class version of torchmetrics should be prefered to functional I'd say?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay.. it's fine.. let's use functional metrics here since you already have all the targets and predictions.
modular metrics are useful, when you are aggregating the metrics, let's say on step-level