Open minkee77 opened 6 years ago
i met this error too! there are also mistakes when i use tensorflow as backend, even I change the data structure for tensorflow.
I turned the backend from thearo to tensorflow and change the data structure, then i successed.
input_shape=(3,img_w,img_h,) to input_shape=(img_w,img_h,3)
Traceback (most recent call last): File "segnet_train.py", line 256, in
train(args)
File "segnet_train.py", line 212, in train model = SegNet()
File "segnet_train.py", line 200, in SegNet model.add(Reshape((n_label,img_w*img_h)))
File "/home/gumingqi/anaconda2/envs/segnet/lib/python2.7/site-packages/keras/models.py", line 522, in add output_tensor = layer(self.outputs[0]) File "/home/gumingqi/anaconda2/envs/segnet/lib/python2.7/site-packages/keras/engine/topology.py", line 638, in call output_shape = self.compute_output_shape(input_shape) File "/home/gumingqi/anaconda2/envs/segnet/lib/python2.7/site-packages/keras/layers/core.py", line 403, in compute_output_shape input_shape[1:], self.target_shape) File "/home/gumingqi/anaconda2/envs/segnet/lib/python2.7/site-packages/keras/layers/core.py", line 391, in _fix_unknown_dimension raise ValueError(msg) ValueError: total size of new array must be unchanged another question is if the backend of keras is theano? thank u!