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