Skip to content

Unexpected depreciation warning in tensorflow 2.16.1 #19811

Closed
@whichedge

Description

@whichedge

Python 3.12
tensorflow 2.16.1
keras 3.3.3
Windows 11

I have just updated to tensorflow 2.16.1 and am going through my code checking of compatablity. When I import my tensorflow code I get the warning:

**WARNING:tensorflow:From \venv\Lib\site-packages\keras\src\backend\common\global_state.py:82: The name tf.reset_default_graph is deprecated. Please use tf.compat.v1.reset_default_graph instead.

The warning points to line 82 in global_state.py in the keras backend, which uses the correct statement (tf.compat.v1.reset_default_graph). I have pin pointed this warning coming from my use of keras.backend.clear_session().

Is this warning valid? Because from what I can see the depreciated tf.reset_default_graph is not used

EDIT: I have got my tensorflow code running and so far it seems to be work without giving any errors....it has called the keras.backend.clear_session() several times and no errors.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions