def buildEvalGraph(self):
with tf.variable_scope('eval_variables', reuse=False):
self.logits = tf.nn.softmax(self.layers[-1].activations, name='logits')
self.correct_predication = tf.equal(tf.arg_max(self.logits, 1), tf.arg_max(self.output, 1))
self.accuracy = tf.reduce_mean(tf.cast(self.correct_predication, tf.float32))
评论列表
文章目录