tensorflow_tutorials/mnist/mnist.py
def check_accuracy(self, test_data, session):
        """Return the accuracy of the model compared with the data."""
        correct_prediction = tf.equal(
            tf.argmax(self.model, 1),
            tf.argmax(self.distribution, 1))

        accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))

        return session.run(accuracy, feed_dict={
            self.inputs: test_data.images,
            self.distribution: test_data.labels
        })
Return the accuracy of the model compared with the data.
Return the accuracy of the model compared with the data.
Return the accuracy of the model compared with the data .
def check_accuracy(self, test_data, session):
        correct_prediction = tf.equal(
            tf.argmax(self.model, 1),
            tf.argmax(self.distribution, 1))
        accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))
        return session.run(accuracy, feed_dict={
            self.inputs: test_data.images,
            self.distribution: test_data.labels
        })
def check_accuracy ( self , test_data , session ) : correct_prediction = tf . equal ( tf . argmax ( self . model , 1 ) , tf . argmax ( self . distribution , 1 ) ) accuracy = tf . reduce_mean ( tf . cast ( correct_prediction , tf . float32 ) ) return session . run ( accuracy , feed_dict = { self . inputs : test_data . images , self . distribution : test_data . labels } )
Return the accuracy of the model compared with the data.
Return the accuracy of the model compared with the data .
"""Return the accuracy of the model compared with the data."""
self
test_data
session