AstarLight / Satellite-Segmentation

615 stars 233 forks source link

backend is tensorflow or theano #19

Open Allen-wg opened 6 years ago

Allen-wg commented 6 years ago

I meet some errors like this: ValueError: Negative dimension size caused by subtracting 2 from 1 for 'max_pooling2d_2/MaxPool' (op: 'MaxPool') with input shapes: [?,1,128,64]. what's the reason behind it ,how to solve it? Thank you!

hanbing6174 commented 6 years ago

this project 's backend is theano if you are based tensorflow, you must change [batch, channel,w, h] to [batch,w, h, channel] in your python code.

zylhub commented 6 years ago

theano backend default, but if you use tensorflow backend,just set_image_dim_ordering

from keras import backend as K
K.set_image_dim_ordering('th')