-
Notifications
You must be signed in to change notification settings - Fork 32
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
ValueError: (F1Score|FBetaScore) expects 2D inputs with shape (batch_size, output_dim). #771
Comments
Same error message using |
@msusol, |
I will show the pip list installed so my code would work in TF 2.16.1. I know I was running into an issue with See also https://www.kaggle.com/datasets/gdataranger/tf2-16-requirements-txt
Please find the zipfile from my 'Colab Notebooks' drive folder + data which I ran on Colab directly. |
Any work around for this? |
This issue is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you. |
This issue was closed because it has been inactive for 28 days. Please reopen if you'd like to work on this further. |
This is an important issue that needs to be resolved |
I provided the zip file to reproduce the issue, but the label "waiting on me" hasn't been changed. |
I have the same issue. works with Accuracy but I get error with F1Score |
System information.
Describe the problem/behavior.
ValueError: FBetaScore expects 2D inputs with shape (batch_size, output_dim). Received input shapes: y_pred.shape=(16, 512, 12) and y_true.shape=(16, 512).
Describe the expected behavior.
Should be able to calculate an FBeta score and compile my model with this metric (discovered in Kaggle competition).
Seemed to work with TFA, similar issue as mine.
https://stackoverflow.com/questions/77236233/f1-score-in-tensorflow
Standalone code to reproduce the issue.
Provide a reproducible test case that is the bare minimum necessary to generate
the problem. If possible, please share a link to Colab/Jupyter/any notebook.
competition.ipynb.zip
Source code / logs.
If including tracebacks, please include the full traceback.
The text was updated successfully, but these errors were encountered: