Received a label value of 3 which is outside the valid range of [0, 2)

16 Views Asked by At
# Consider increasing epochs for better performance
import numpy as np
X = np.array(X,dtype='float64')
y = np.array(y, dtype ='float64')
model.fit(X, y,epochs=10)
test_loss, test_acc = model.evaluate(X, y)
print(f"Test accuracy: {test_acc}")

This error message : Received a label value of 3 which is outside the valid range of [0, 2). Label values: 0 0 0 1 1 0 1 1 3 0 3 2 0 3 3 3 0 0 3 2 3 2 0 0 1 3 2 3 2 2 3 1 [[{{node sparse_categorical_crossentropy/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits}}]] [Op:__inference_train_function_2189]

Load the images using the Keras ImageDat

Received a label value of 3 which is outside the valid range of [0, 2). Label values: 0 0 0 1 1 0 1 1 3 0 3 2 0 3 3 3 0 0 3 2 3 2 0 0 1 3 2 3 2 2 3 1 [[{{node sparse_categorical_crossentropy/SparseSoftmaxCrossEntropyWithLogits/SparseSoftmaxCrossEntropyWithLogits}}]] [Op:__inference_train_function_2189]

Load the images using the Keras ImageDat

0

There are 0 best solutions below