You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): ubuntu 18.04
TensorFlow version and how it was installed (source or binary): 2.1.0 binary (conda)
TensorFlow-Addons version and how it was installed (source or binary): 0.8.3 binary(pip)
Python version: 3.7.6
Is GPU used? (yes/no): yes
Describe the bug
The code goes wrong when I add "tfa.metrics.RSquare(dtype=tf.float32)" to model metrics.
The exception is "TypeError: tf__update_state() got an unexpected keyword argument 'sample_weight'"
And I don't see "sample_weight" parameter , what been added shown in #564 , of update_state() function in class RSquare in addons version 0.8.3.
Are there something wrong with my installed tensorflow and addons package?
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
The text was updated successfully, but these errors were encountered:
@lotest#564 was not merged, that's why you don't see sample_weight being available. The problem here is that some of the metrics in TFA do not take a sample_weight argument because they don't use it. It's a problem though because Keras will automatically pass sample weights when the user declare them. A good fix would be to add sample_weights in all metrics and enforce that the argument is present. And if the tensor is not used during the computation, then just raise a warning.
This is linked to #992 , we lack some unified tests. This will become easier once we switch to pytest for testing.
System information
Describe the bug
The code goes wrong when I add "tfa.metrics.RSquare(dtype=tf.float32)" to model metrics.
The exception is "TypeError: tf__update_state() got an unexpected keyword argument 'sample_weight'"
And I don't see "sample_weight" parameter , what been added shown in #564 , of update_state() function in class RSquare in addons version 0.8.3.
Are there something wrong with my installed tensorflow and addons package?
Code to reproduce the issue
Usage in my code:
Other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
The text was updated successfully, but these errors were encountered: