-
Notifications
You must be signed in to change notification settings - Fork 282
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
ValueError: Layer weight shape (3, 3, 3, 64) not compatible with provided weight shape (64, 3, 3, 3) #39
Comments
I suspect you have keras 2 installed, but this only runs on v1. I need to update the versions in setup.py. To confirm, run |
Hi creator of project, yes, my keras version is 2.02 |
Hi @awentzonline, are you planning on supporting Keras 2 anytime soon? Is there a workaround for the time being? |
Hi, I had the same question as above. I don't have a way to access anything below Keras 2 as I'm using a shared computing cluster. Any suggestions? |
@pmlantos What I have done is to use |
Thanks, it may be ... I've set up a virtual environment with 1.2.1. Do I
need to reinstall image-analogies in the virtual environment too?
On Apr 29, 2017 3:26 AM, "Ahmed Baracat" <notifications@github.com> wrote:
@pmlantos <https://github.com/pmlantos> What I have done is to use
virtualenv and instal Keras==1.1.1 on it. Not sure if that is feasible in
your case.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AajKY8OQ9Stizg_xb3WcUmOhiv7mjwOrks5r0uY-gaJpZM4M1bVy>
.
|
Unfortunately I can't get this package to run within a virtual environment, though setting the environment up seems straightforward. Wonder if I can find a way to cheaply do it on AWS. |
That's what worked for me. Hope it helps.
|
Thanks, unfortunately doesn't work for me. Some of the installation has to
go into shared parts of the computing cluster that I don't have access to.
Appreciate the help though.
…On Sun, Apr 30, 2017 at 5:37 AM, Ahmed Baracat ***@***.***> wrote:
That's what worked for me. Hope it helps.
1. Activate the virtualenv
2. Check the version of keras installed using pip show keras
3. If it is Keras version 2 then pip uninstall keras followed by pip
install keras==1.1.1.
4. Uninstall image-analogies
5. Reinstall image-analogies
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#39 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AajKY7SbYca6ke1ZGs0AHy1Wbm_dkBhfks5r1FZegaJpZM4M1bVy>
.
|
No worries, but I think that if you are using |
I have same problem as first make sure that requirements.txt Cython==0.23.4 and I use sudo pip install theano==0.9.0b1 than it works~ |
and make sure that you have edit ~/.keras/keras.json like this |
I have replaced the 94th line in image_analogy/vgg16.py with |
…, 3) to (3, 3, 3, 64) for keras versions 2.0.0 and above.
…, 3) to (3, 3, 3, 64) for keras versions 2.0.0 and above.
Hi, I got the following message running the command, it seems to be the weight shape problem , any idea on solving it? thanks :
Traceback (most recent call last):
File "/usr/local/bin/make_image_analogy.py", line 27, in
image_analogy.main.main(args, model_class)
File "/usr/local/lib/python2.7/dist-packages/image_analogy/main.py", line 69, in main
net = vgg16.get_model(img_width, img_height, weights_path=args.vgg_weights, pool_mode=args.pool_mode)
File "/usr/local/lib/python2.7/dist-packages/image_analogy/vgg16.py", line 89, in get_model
layer.set_weights(weights)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 1154, in set_weights
'provided weight shape ' + str(w.shape))
ValueError: Layer weight shape (3, 3, 3, 64) not compatible with provided weight shape (64, 3, 3, 3)
The text was updated successfully, but these errors were encountered: