Closed wuzhe71 closed 6 years ago
Hi @inkfish2015, thanks for downloading our code.
The correct input shape is Input(shape=(3, img_rows, img_cols))
. Have you set the dim ordering to "th" in the keras.json file?
Thanks, i set the dim ordering and reinstall theano and keras and solve the problem.
I install Theano0.9.0 and keras1.1.0 and test the code in my datasets according to your comand. But it errors in
Exception: "concat" mode can only merge layers with matching output shapes except for the concat axis. Layer shapes: [(None, 1, 60, 256), (None, 1, 60, 512), (None, 1, 60, 512)]
So i modify the input
input_ml_net = Input(shape=(3, img_rows, img_cols))
toinput_ml_net = Input(shape=(img_rows, img_cols, 3))
, and convertconcat_axis=1
toconcat_axis=3
, the network is correctly constructed:But it errors in:
Exception: Error when checking : expected input_1 to have shape (None, 480, 640, 3) but got array with shape (1, 3, 480, 640)
Then i comment out
ims = ims.transpose((0, 3, 1, 2))
inpreprocess_images
, and it errors in :So how to make the code work well?
Best Regards