-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, i use tensorflow-gpu==2.4.1, keras==2.2.4 ,but have the following error in load_model: #6
Comments
thank you , I fix this error , but have the next error: XXX lineno: 75, opcode: 0 |
python version error. because your checkpoint is trained based on python3.5, so you should change python version to 3.5 intead of 3.6 |
https://blog.csdn.net/Sarah_LZ/article/details/86526968 |
Traceback (most recent call last):
File "data_visualization.py", line 65, in
model = keras.models.load_model(args.model, custom_objects=backbone.custom_objects)
File "/home/sunzong/anaconda3/envs/acrfnet04/lib/python3.6/site-packages/keras/engine/saving.py", line 419, in load_model
model = _deserialize_model(f, custom_objects, compile)
File "/home/sunzong/anaconda3/envs/acrfnet04/lib/python3.6/site-packages/keras/engine/saving.py", line 225, in _deserialize_model
model = model_from_config(model_config, custom_objects=custom_objects)
File "/home/sunzong/anaconda3/envs/acrfnet04/lib/python3.6/site-packages/keras/engine/saving.py", line 458, in model_from_config
return deserialize(config, custom_objects=custom_objects)
File "/home/sunzong/anaconda3/envs/acrfnet04/lib/python3.6/site-packages/keras/layers/init.py", line 55, in deserialize
printable_module_name='layer')
File "/home/sunzong/anaconda3/envs/acrfnet04/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 145, in deserialize_keras_object
list(custom_objects.items())))
File "/home/sunzong/anaconda3/envs/acrfnet04/lib/python3.6/site-packages/keras/engine/network.py", line 1022, in from_config
process_layer(layer_data)
File "/home/sunzong/anaconda3/envs/acrfnet04/lib/python3.6/site-packages/keras/engine/network.py", line 1008, in process_layer
custom_objects=custom_objects)
File "/home/sunzong/anaconda3/envs/acrfnet04/lib/python3.6/site-packages/keras/layers/init.py", line 55, in deserialize
printable_module_name='layer')
File "/home/sunzong/anaconda3/envs/acrfnet04/lib/python3.6/site-packages/keras/utils/generic_utils.py", line 147, in deserialize_keras_object
return cls.from_config(config['config'])
File "/home/sunzong/anaconda3/envs/acrfnet04/lib/python3.6/site-packages/keras/engine/base_layer.py", line 1109, in from_config
return cls(**config)
File "/home/sunzong/anaconda3/envs/acrfnet04/lib/python3.6/site-packages/keras/legacy/interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "/home/sunzong/anaconda3/envs/acrfnet04/lib/python3.6/site-packages/keras/engine/input_layer.py", line 87, in init
name=self.name)
File "/home/sunzong/anaconda3/envs/acrfnet04/lib/python3.6/site-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'
The text was updated successfully, but these errors were encountered: