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
Please make sure that this is a bug. As per our GitHub Policy,
we only address code/doc bugs, performance issues, feature requests and
build/installation issues on GitHub. tag:bug_template
System information
Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 20.04
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
Keras version: 2.4.3
TensorFlow installed from (source or binary): source
TensorFlow version (use command below): 2.5.0
Python version: 3.7.10
Bazel version (if compiling from source): N/A
GCC/Compiler version (if compiling from source): N/A
CUDA/cuDNN version: N/A
GPU model and memory: N/A
Describe the current behavior
The following error is raised when importing Model from keras.models
dosma/models/oaiunet2d.py:14: in<module>
from keras.models import Model
/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/keras/__init__.py:20: in<module>
from . import initializers
/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/keras/initializers/__init__.py:124: in<module>populate_deserializable_objects()
/opt/hostedtoolcache/Python/3.7.10/x64/lib/python3.7/site-packages/keras/initializers/__init__.py:49: in populate_deserializable_objects
LOCAL.GENERATED_WITH_V2 = tf.__internal__.tf2.enabled()
E AttributeError: module 'tensorflow.compat.v2.__internal__' has no attribute 'tf2'
Describe the expected behavior
No error should be thrown
Contributing - Do you
want to contribute a PR? (yes/no): if this requires a fix, yes
Standalone code to reproduce the issue
fromkeras.modelsimportModel
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:
Great, thanks! I noticed the separate tf/keras imports worked up until tensorflow=2.4.1 - it seems as though the recent tensorflow 2.5.0 release caused this issue. Would it be useful to add this to the list of incompatibilities between the keras and tensorflow packages ?
Please make sure that this is a bug. As per our
GitHub Policy,
we only address code/doc bugs, performance issues, feature requests and
build/installation issues on GitHub. tag:bug_template
System information
Describe the current behavior
The following error is raised when importing
Model
from keras.modelsDescribe the expected behavior
No error should be thrown
Contributing - Do you
want to contribute a PR? (yes/no): if this requires a fix, yes
Standalone code to reproduce the issue
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: