Closed ghost closed 7 years ago
We mainly developed the code using the Theano backend. But we tested on Tensorflow and it was working.
Can you provide a bit more information? What is the line that throws the exception?
Thanks for the reply. I thinks it is in models.oy
, line 46 i = Input(shape=(in_ch, 512, 512))
, and some similar lines. Because I notice that keras uses different conventions for 2D data, as:
For 2D data (e.g. image), "tf" assumes (rows, cols, channels) while "th" assumes (channels, rows, cols).
[1]
Yes, that is true, thanks for reminding me that. You should set the "image_dim_ordering" to "th" on the ~/.keras/keras.json file.
Let me now if that solves your problem.
Thanks. It is OK now.
I use tensorflow1.0, but it reports error as:
ValueError: Negative dimension size caused by subtracting 2 from 1 for 'Conv2D_8' (op: 'Conv2D') with input shapes: [?,1,1,512], [2,2,512,512]