-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Update PR curve summary op to use tf.one_hot #316
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
Conversation
Previously, they had used scatter-related logic. This change makes the logic one-hot encode the indices and perform a summation in order to bucket the predictions. This change thus removes variables and control dependencies from the summary op logic, which reduces complexity.
Will review code in a bit. |
|
Ah, I see: the patch to Can you please confirm that the test that you added fails before this commit and passes after it? |
I updated the PR description to note that the patch had been awry. The test fails before this commit:
and now passes. |
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.
The test fails before this commit: […] and now passes.
Perfect: that's what I wanted to hear. Thanks!
I'm also glad that we've gotten rid of the Variable
s. Everything is now much easier to reason about.
Previously, the op had used scatter-related logic that I had introduced as a patch (because scatter_add was unsupported due to tensorflow/tensorflow#11856). This change makes the logic one-hot encode the indices and perform a summation in order to bucket the predictions. This change thus removes variables and control dependencies from the summary op logic, which reduces complexity.
Also, the previous logic to patch scatter_add had been incorrect (
scatter_update
did not sum up values at the same indices), though the test was too simple to catch that. A subsequent PR will make the tests run off of data generated from a demo and thus make the tests more rigorous.