tf-keras
tf-keras copied to clipboard
Showing warning just after importing tf_keras
when i run the code
import tf_keras
the out output is
WARNING:tensorflow:From C:\Users\kumar\AppData\Local\Programs\Python\Python312\Lib\site-packages\tf_keras\src\losses.py:2976: The name tf.losses.sparse_softmax_cross_entropy is deprecated. Please use tf.compat.v1.losses.sparse_softmax_cross_entropy instead.
I am not even using tensorflow library but I still get this warning
@kr-Ayaman, Apologies for the delay. Could you please confirm which version of tf-keras you are trying and the TensorFlow version as well. AFAIK it is possible that tf.compat.v1.losses.sparse_softmax_cross_entropy which calls the older tf.losses.sparse_softmax_cross_entropy and this causes the deprecation warning to trigger.
The deprecations are added as decorators, so they trigger at import time when the module is parsed and I suspect that is for the eager.
I am using tf-keras version 2.16.0 and tensorflow version 2.16.1
@kr-Ayaman, COuld you please let us know in which environment you are facing the mentioned warning? I tried in the colab and could not find the warning. Thank you!
VS code
On Wed, Jun 5, 2024, 1:56 PM tilakrayal @.***> wrote:
@kr-Ayaman https://github.com/kr-Ayaman, COuld you please let us know in which environment you are facing the mentioned warning? I tried in the colab and could not find the warning. Thank you!
— Reply to this email directly, view it on GitHub https://github.com/keras-team/tf-keras/issues/778#issuecomment-2149193371, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCBQ6TISVRDEUSWMQ73RIW3ZF3DSTAVCNFSM6AAAAABHSUE2OKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBZGE4TGMZXGE . You are receiving this because you were mentioned.Message ID: @.***>
This issue is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you.
This issue was closed because it has been inactive for 28 days. Please reopen if you'd like to work on this further.