-
Notifications
You must be signed in to change notification settings - Fork 105
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: total size of new array must be unchanged #6
Comments
Try changing your |
@waissbluth ,this also doesn't seem to work |
Yes, I believe that's right. After each pooling layer, the dimensionality is halved (stride of 2). For that to happen properly (and in order to be able to reverse it during upsampling), in this implementation the original size has to be a multiple of either 8 (3 pooling layers) or, more strictly, 16 if you uncomment the last MaxPooling2D layer in the end of the encoder, effectively adding a fourth pooling operation. Unless you change that line, an input size of 360x480 should not cause any problems. |
I'm also encountering this error and I'm running with the theano backend:
|
somebody worked it out? |
Hey @yarin05, try plotting your network with:
to see if the output shapes in the encoder are mirrored in the decoder. It should help you locate the culprit. |
@PavlosMelissinos @fateh288 Regards |
@pranitapradhan91 You've obviously mixed up the ordering of the dimensions. Keras by default uses nwhc whereas you have ncwh. Just change Otherwise, you can run |
Thank you @PavlosMelissinos . This worked. |
I'm not using theano, sorry, try their github or the google usergroup |
On running segnet.py , I get the above error on line
autoencoder.add(Reshape((12,data_shape), input_shape=(12,360,480)))
Any solution to this ?
The text was updated successfully, but these errors were encountered: