-
Notifications
You must be signed in to change notification settings - Fork 19.5k
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
Incorrect values returned by the evaluate method in Model API #20788
Comments
Additional information: the problem doesn't seem to arise when passing Maybe there is an issue with one of the internal callbacks ? If anything the correct values for the loss and accuracy should be returned no matter which batch_size is used (as long as it divides the number of samples). |
Hi @Carath - I have tried to replicate the issue and the problem doesn't seem to arise when passing |
Thank you for your answer. I fail to see how this really fixes the issue, many users might just call the evaluate() method and be confused by the mismatching values. Moreover it seems quite weird that changing the verbosity level of the method yields completely different values to be printed. I also don't think this is a batch size issue, as the returned values obtained when passing print(model.evaluate(x_test, y_test_one_hot, batch_size=32, return_dict=True)) Output:
I propose to set |
Hi @Carath - Changing the verbosity level of the method yields slightly different values because |
Created a pull request to prevent the incorrect behavior to affect most users. On a side note, replies to this thread seem to be (a least partially) coming from a chat bot, I don't believe this to be really appropriate if that is the case. |
The evaluate() method from the Model API returns accuracy and loss values incoherent with the ones computed during training.
Issue happening with:
Issue not happening with:
This has been tested both with and without a GPU, on two personal computers and on a Google Colab VM.
Example of this behavior on the validation values:
Code to produce the issue:
The text was updated successfully, but these errors were encountered: