Open strivehub opened 5 years ago
同问
ValueError: Negative dimension size caused by subtracting 2 from 1 for 'max_pooling2d_2/MaxPool' (op: 'MaxPool') with input shapes: [?,1,128,128]. 楼主该怎么处理??
试一下在函数起始部分加上:
from keras import backend as K
K.set_image_dim_ordering('th')
ValueError: Negative dimension size caused by subtracting 2 from 1 for 'max_pooling2d_2/MaxPool' (op: 'MaxPool') with input shapes: [?,1,128,128]. 楼主该怎么处理??
试一下在函数起始部分加上: from keras import backend as K K.set_image_dim_ordering('th')
Thanks bro.
ValueError: Negative dimension size caused by subtracting 2 from 1 for 'max_pooling2d_2/MaxPool' (op: 'MaxPool') with input shapes: [?,1,128,128]. 楼主该怎么处理??
试一下在函数起始部分加上: from keras import backend as K K.set_image_dim_ordering('th')
哪個函數起始,segnet_train.py的import那裏嗎
哪個函數起始,segnet_train.py的import那裏嗎
直接在segnet_train函数的最开始添加就OK,是因为版本更新问题。 set_image_dim_ordering(dim_ordering)是用于设置图像的维度顺序的,有2个可选参数: (1)‘th’:即Theano模式,会把通道维放在第二个位置上。 (2)‘tf’:即TensorFlow模式,会把通道维放在最后的位置上。
ValueError: Negative dimension size caused by subtracting 2 from 1 for 'max_pooling2d_2/MaxPool' (op: 'MaxPool') with input shapes: [?,1,128,128]. 楼主该怎么处理??