Skip to content
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

VGG16 Error "AttributeError: 'Tensor' object has no attribute '_keras_shape'" #3

Open
TestPW opened this issue Nov 8, 2018 · 1 comment

Comments

@TestPW
Copy link

TestPW commented Nov 8, 2018

When I am running command python prepare_data.py getting below error

Using TensorFlow backend.
Traceback (most recent call last):
File "prepare_data.py", line 132, in
features = extract_features(directory)
File "prepare_data.py", line 38, in extract_features
model = Model(inputs=model.inputs, outputs=model.layers[-1].output)
File "C:\Users\XX\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\legacy\interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "C:\Users\XX\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\engine\network.py", line 91, in init
self._init_graph_network(*args, **kwargs)
File "C:\Users\XX\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\engine\network.py", line 251, in _init_graph_network
input_shapes=[x._keras_shape for x in self.inputs],
File "C:\Users\XX\AppData\Local\Programs\Python\Python36\lib\site-packages\keras\engine\network.py", line 251, in
input_shapes=[x._keras_shape for x in self.inputs],
AttributeError: 'Tensor' object has no attribute '_keras_shape'

@Div99
Copy link
Owner

Div99 commented Nov 10, 2018

It seems to be an error with Keras itself. Probably has to do with them changing their Model API. Will take a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants