Received a label value of 1 which is outside the valid range of [0, 1) - Python, Keras

后端 未结 5 1408
臣服心动
臣服心动 2021-02-01 14:25

I am working on a simple cnn classifier using keras with tensorflow background.

def cnnKeras(training_data, training_labels, test_data, test_labels, n_dim):
  pr         


        
5条回答
  •  不要未来只要你来
    2021-02-01 15:13

    Range [0, 1) means every number between 0 and 1, excluding 1. So 1 is not a value in the range [0, 1).

    I am not 100% sure, but the issue could be due to your choice of loss function. For a binary classification, binary_crossentropy should be a better choice.

提交回复
热议问题