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
{{ message }}
This repository has been archived by the owner on Mar 3, 2024. It is now read-only.
Traceback (most recent call last):
File "load_and_extract.py", line 18, in <module>
model = load_trained_model_from_checkpoint(config_path, checkpoint_path)
File "/usr/local/lib/python3.5/dist-packages/keras_bert/loader.py", line 43, in load_trained_model_from_checkpoint
training=training,
File "/usr/local/lib/python3.5/dist-packages/keras_bert/bert.py", line 58, in get_model
inputs = get_inputs(seq_len=seq_len)
File "/usr/local/lib/python3.5/dist-packages/keras_bert/layers/inputs.py", line 15, in get_inputs
) for name in names]
File "/usr/local/lib/python3.5/dist-packages/keras_bert/layers/inputs.py", line 15, in <listcomp>
) for name in names]
File "/usr/local/lib/python3.5/dist-packages/keras/engine/input_layer.py", line 178, in Input
input_tensor=tensor)
File "/usr/local/lib/python3.5/dist-packages/keras/legacy/interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/keras/engine/input_layer.py", line 87, in __init__
name=self.name)
File "/usr/local/lib/python3.5/dist-packages/keras/backend/tensorflow_backend.py", line 517, in placeholder
x = tf.placeholder(dtype, shape=shape, name=name)
AttributeError: module 'tensorflow' has no attribute 'placeholder'
Version Info
tf-nightly-gpu-2.0-preview 2.0.0.dev20190304
Keras 2.2.4
python 3.5.2
The text was updated successfully, but these errors were encountered:
There is nothing I can do because the incompatibility happens between Keras and Tensorflow. Keras has a branch named "tf-2" that solves the compatibility problem with Tensorflow 2.0. I don't think you should use a preview version of Tensorflow while Keras has no stable release for it.
else: tf.compat.v1.disable_eager_execution() x = tf.compat.v1.placeholder(dtype, shape=shape, name=name)
File "/usr/local/lib/python3.5/dist-packages/keras/backend/tensorflow_backend.py", line 517
In here I change like this...
For similar error, I have to change it manually.
There is nothing I can do because the incompatibility happens between Keras and Tensorflow. Keras has a branch named "tf-2" that solves the compatibility problem with Tensorflow 2.0. I don't think you should use a preview version of Tensorflow while Keras has no stable release for it.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the Bug
On tensorflow 2.0, there is no tf.placeholder
Version Info
tf-nightly-gpu-2.0-preview 2.0.0.dev20190304
Keras 2.2.4
python 3.5.2
The text was updated successfully, but these errors were encountered: