tensorflow.python.framework.errors_impl.InvalidArgumentError:

tensorflow.python.framework.errors_impl.InvalidArgumentError: Negative dimension size caused by subtracting 2 from 1 for 'max_pooling2d_2/MaxPool' (op: 'MaxPool') with input shapes: [?,1,128,128].


报这种类型的错误:因为Keras调用的后端深度学习的框架一般是theano或者TensorFlow,但是theano输入的tensor是(batch_size,channal,w,h),而TensorFlow的tensor是(batch_size,w,h,channal),如果用反了,就会报错

猜你喜欢

转载自blog.csdn.net/fu6543210/article/details/80810941
今日推荐