You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to convert the build.py to python 3 and keras version 2.1.4. I came a long way but I have some trouble with (hopefully) the last step. Below I posted the code I have now but what I need to do yet is the final reshaping. I receive the error ValueError: total size of new array must be unchanged which according to this answer I got this error because the shape of my output is not corresponding to what I want to reshape it to. However my height and width are both factors of 32 so I do not understand the problem. The final layer of the network (a batch normalization) returns a shape of (Bat (None, 0, 256, 2). According to the code I found I have to reshape this using
autoencoder.add(Reshape((n_labels, img_h*img_w))
which would be (2, (256 * 256)). This sounds incorrect the 256 * 256 part is very large, but I don't fully understand the reshape function.
I saw similair questions in other threads but there the problem seems to be that tensorflow was used instead of theano. I am using Theano as backend.
Can somebody shed some light on what this reshaping does and maybe suggest to what dimensions I need to reshape?
I am trying to convert the build.py to python 3 and keras version 2.1.4. I came a long way but I have some trouble with (hopefully) the last step. Below I posted the code I have now but what I need to do yet is the final reshaping. I receive the error
ValueError: total size of new array must be unchanged
which according to this answer I got this error because the shape of my output is not corresponding to what I want to reshape it to. However my height and width are both factors of 32 so I do not understand the problem. The final layer of the network (a batch normalization) returns a shape of(Bat (None, 0, 256, 2)
. According to the code I found I have to reshape this usingwhich would be
(2, (256 * 256))
. This sounds incorrect the 256 * 256 part is very large, but I don't fully understand the reshape function.I saw similair questions in other threads but there the problem seems to be that tensorflow was used instead of theano. I am using Theano as backend.
Can somebody shed some light on what this reshaping does and maybe suggest to what dimensions I need to reshape?
This is the entire model I'm using:
The text was updated successfully, but these errors were encountered: