When I train the model,I can't get my accuracy
model.fit(train, train_label,
batch_size=64,
epochs=12,
verbose=1,
validation_data=(test, test_label))
when I train the data,it shows like that:
Epoch 1/12
8000/8000 [==============================] - 166s 21ms/step - loss: 0.4743 - val_loss: 0.2727
It shows the number of loss, but no accuracy.
When I evaluate,
score = model.evaluate(test, test_label, verbose=0)
print('Test loss:', score[0])
print('Test accuracy:', score[1])
it tells me that:
IndexError: invalid index to scalar variable.
I don't know why the score is a scalar variable.
How can I get my accuracy?