def test_tensorflow_mnist(self):
    (classifier, sess) = get_image_classifier_tf(from_logits=False)
    scores = get_labels_np_array(classifier.predict(self.x_train_mnist))
    acc = (np.sum((np.argmax(scores, axis=1) == np.argmax(self.y_train_mnist, axis=1))) / self.y_train_mnist.shape[0])
    logger.info('[TF, MNIST] Accuracy on training set: %.2f%%', (acc * 100))
    scores = get_labels_np_array(classifier.predict(self.x_test_mnist))
    acc = (np.sum((np.argmax(scores, axis=1) == np.argmax(self.y_test_mnist, axis=1))) / self.y_test_mnist.shape[0])
    logger.info('[TF, MNIST] Accuracy on test set: %.2f%%', (acc * 100))
    self._test_backend_mnist(classifier, self.x_test_mnist, self.y_test_mnist)
def test_tensorflow_mnist(self):
    (classifier, sess) = get_image_classifier_tf(from_logits=False)
    scores = get_labels_np_array(classifier.predict(self.x_train_mnist))
    acc = (np.sum((np.argmax(scores, axis=1) == np.argmax(self.y_train_mnist, axis=1))) / self.y_train_mnist.shape[0])
    logger.info('[TF, MNIST] Accuracy on training set: %.2f%%', (acc * 100))
    scores = get_labels_np_array(classifier.predict(self.x_test_mnist))
    acc = (np.sum((np.argmax(scores, axis=1) == np.argmax(self.y_test_mnist, axis=1))) / self.y_test_mnist.shape[0])
    logger.info('[TF, MNIST] Accuracy on test set: %.2f%%', (acc * 100))
    self._test_backend_mnist(classifier, self.x_test_mnist, self.y_test_mnist)