-
Notifications
You must be signed in to change notification settings - Fork 74.2k
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
Fixed missing export for Huber loss as tf.keras.losses.huber and tf.keras.metrics.huber #37535
Conversation
Why is this required? Can we use the Huber loss class instead? The other loss functions are exported because they were available historically. |
This would make the API consistent, since all the other loss function are available as classes and also as functions. And yes we can use Huber loss class just like the rest of the loss classes |
tensorflow/python/keras/losses.py
Outdated
@@ -1415,6 +1415,7 @@ def categorical_hinge(y_true, y_pred): | |||
return math_ops.maximum(0., neg - pos + 1.) | |||
|
|||
|
|||
@keras_export('keras.metrics.huber', 'keras.losses.huber') |
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.
Can we only add it to losses namespace for now? Also you will need to update golden files '.pbtxt' files for API changes.
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.
I have removed it from the tf.keras.metrics
namespace, and also can you please let me know what .pbtxt
files need changes?
@mihaimaruseac can you advice on how API changes ie.pbtxt files can be updated? |
To generate the proto files used for API you need to run the
Then, this will need an API review (there are weekly meetings for this) and API approval before being imported |
As tensorflow/api-owners: we'd rather keep Huber as class-only (as well any future losses). |
No description provided.