guides/writing_your_own_callbacks.py/LossAndErrorPrintingCallback/on_test_batch_end
class LossAndErrorPrintingCallback:    def on_test_batch_end(self, batch, logs=None):
        print(
            "Up to batch {}, the average loss is {:7.2f}.".format(
                batch, logs["loss"]
            )
        )