ValueError: Index out of range using input dim 2; input has only 2 dims for 'crf_1/strided_slice' (op: 'StridedSlice') with input shapes: [?,110], [3], [3], [3] and with computed input tensors: input[3] = <1 1 1>.
这个由于很简单的错误:
比如你的数据image.shape=(512,512)
你的语句
if image[:,:,1]>0
显然你差了一个维度,只需要把image扩展就好了
参考:
https://github.com/keras-team/keras-contrib/issues/244
tf.expand_dims: