Tensorflow&Keras:Alternatively, you can use the loss function sparse_categorical_crossentropy instead

深度学习TensorFlow 2913

找到categorical_crossentropysparse_categorical_crossentropy替换。

model.compile(loss='sparse_categorical_crossentropy', optimizer=sgd, metrics=['accuracy'])

Post Comment