-
Notifications
You must be signed in to change notification settings - Fork 133
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
image_features[0,:] = get_image_model(CNN_weights_file_name).predict(im)[0] ValueError: could not broadcast input array from shape (1000) into shape (4096) #23
Comments
keras version 2.2.4 |
Downgrade your keras version to 2.0, it will work. |
The new error arises by downgrading the keras version. |
You need to remove the top layers of the pre-trained VGG and keep the Dense layer of 4096 as your output |
@yashkark @AmrataRamchandani Hello, I have the same problem. Have you solved the problem? Can you share with us how to solve it? Thank you very much! |
did any one find any working solution for this issue? |
I have facing this issue can anyone help? AttributeError Traceback (most recent call last) AttributeError: can't set attribute During handling of the above exception, another exception occurred: AttributeError Traceback (most recent call last) in get_image_model(CNN_weights_file_name) ~\OneDrive\Documents\Process Studio Workspace\VQA_Demo-master\models\CNN\VGG.py in VGG_16(weights_path) ~\OneDrive\Documents\Process Studio Workspace\VQA_Demo-master\models\CNN\VGG.py in pop(model) ~\RobotLab\lib\site-packages\tensorflow_core\python\keras\engine\base_layer.py in setattr(self, name, value) AttributeError: Can't set the attribute "outbound_nodes", likely because it conflicts with an existing read-only @Property of the object. Please choose a different name. |
Finally, I overcame this issue. It's a package version problem. Use python==3.5, tensorflow==1.2.0, keras==2.0.6, scikit-learn==0.18.1, spacy==2.0.2, opencv-python==3.2.0.7 and it will work. I have uploaded my anaconda env at https://drive.google.com/file/d/1-9QUB7ho3jzXmFN2eM-6K4O5uvkGAOGZ/view?usp=sharing. |
No description provided.
The text was updated successfully, but these errors were encountered: