-
Notifications
You must be signed in to change notification settings - Fork 613
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
Adding sample weight and keras test to R-Square #564
Conversation
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.
Thanks @SSaishruthi looks good! Please see the attached comments.
if __name__ == '__main__': | ||
tf.test.main() |
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.
Why remove this?
@@ -51,7 +51,7 @@ def __init__(self, name='r_square', dtype=tf.float32): | |||
self.res = self.add_weight("residual", initializer="zeros") | |||
self.count = self.add_weight("count", initializer="zeros") | |||
|
|||
def update_state(self, y_true, y_pred): | |||
def update_state(self, y_true, y_pred, sample_weight=None): |
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 believe sample_weight
needs to be applied? See https://github.com/tensorflow/tensorflow/blob/r2.0/tensorflow/python/keras/metrics.py#L317-L329
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.
For now, we are adding it to be done. Will create a new PR with implementation for the same.
I'll close this pull request as it has been inactive for a while now. Feel free to comment if you want me to reopen the pull request. |
Added:
Sample Weight
parameter@Squadrick Can you please take a look at it?