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

找到categorical_crossentropysparse_categorical_crossentropy替换。

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

Post Comment