Created
March 22, 2017 22:57
-
-
Save mrubash1/97c33a71574e787b836b9e4e08fd074e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def setup_summary_statistics(self): | |
# Create a placeholder for the summary statistics | |
with tf.name_scope("accuracy"): | |
# Compute the edit (Levenshtein) distance of the top path | |
distance = tf.edit_distance(tf.cast(self.decoded[0], tf.int32), self.targets) | |
# Compute the label error rate (accuracy) | |
self.ler = tf.reduce_mean(distance, name='label_error_rate') | |
self.ler_placeholder = tf.placeholder(dtype=tf.float32, shape=[]) | |
self.train_ler_op = tf.summary.scalar("train_label_error_rate", self.ler_placeholder) | |
self.dev_ler_op = tf.summary.scalar("validation_label_error_rate", self.ler_placeholder) | |
self.test_ler_op = tf.summary.scalar("test_label_error_rate", self.ler_placeholder) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment