The answer (as detailed quite thoroughly here and here) is that specifying...
model.compile(optimizer = 'rmsprop', loss = 'binary_crossentropy', metrics=['accuracy'])
model.compile(optimizer = 'rmsprop', loss = 'binary_crossentropy', metrics=['accuracy'])
...causes causes keras to guess, incorrectly, that because I am using binary_crossentropybinary_crossentropy
for the loss function, that I would want to use binary_accuracybinary_accuracy
as the way of reporting the accuracy metrics. Apparently, one should specify that one wants the categorical_accuracycategorical_accuracy
metrics if one, as I do, has more than two classes.