From cfa2dca70b1cbc3f974f7f9b24ebf64fa6ef68f2 Mon Sep 17 00:00:00 2001 From: Tilman Kamp Date: Mon, 21 Nov 2016 13:50:35 +0100 Subject: [PATCH] Better markdown based on PR comments --- DeepSpeech.ipynb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/DeepSpeech.ipynb b/DeepSpeech.ipynb index f92eb59d..e93cc379 100644 --- a/DeepSpeech.ipynb +++ b/DeepSpeech.ipynb @@ -714,7 +714,7 @@ " accuracy = tf.reduce_mean(distance)\n", "```\n", "\n", - "Finally, the `total_loss` and `avg_loss`, the `distance` and `accuracy`, the `decoded` batch and the original `batch_y` are returned to the caller\n", + "Finally, the calculated total and average losses, the Levenshtein distance and the recognition accuracy are returned, alongside the decoded batch and the original batch_y (which contains the verified transcriptions).\n", "```python\n", " # Return results to the caller\n", " return total_loss, avg_loss, distance, accuracy, decoded, batch_y\n", @@ -894,15 +894,16 @@ " * the CTC decodings ```decoded```,\n", " * the (total) loss against the outcome (Y) ```total_loss```, \n", " * the loss averaged over the whole batch ```avg_loss```,\n", - " * the optimization gradient (computed on base of the averaged loss),\n", - " * the distances between the decodings and the originals ```distance``` and\n", + " * the optimization gradient (computed based on the averaged loss),\n", + " * the Levenshtein distances between the decodings and their transcriptions ```distance```,\n", " * the accuracy of the outcome averaged over the whole batch ```accuracy``` \n", " \n", "and retain the original ```labels``` (Y).\n", " \n", - "```decoded```, ```labels```, the optimization gradient, ```distance```, ```accuracy```, ```total_loss``` and ```avg_loss``` are collected into the respective arrays ```tower_decodings, tower_labels, tower_gradients, tower_distances, tower_accuracies, tower_total_losses, tower_avg_losses``` (dimension 0 being the tower).\n", + "```decoded```, ```labels```, the optimization gradient, ```distance```, ```accuracy```, ```total_loss``` and ```avg_loss``` are collected into the corresponding arrays ```tower_decodings, tower_labels, tower_gradients, tower_distances, tower_accuracies, tower_total_losses, tower_avg_losses``` (dimension 0 being the tower).\n", "\n", - "Finally this new method `get_tower_results()` will return those tower arrays either directly or in case of ```tower_accuracies``` the averaged accuracy value and in case of ```tower_avg_losses``` the averaged loss value accross all towers." + "Finally this new method `get_tower_results()` will return those tower arrays.\n", + "In case of ```tower_accuracies``` and ```tower_avg_losses```, it will return the averaged values instead." ] }, { @@ -1210,7 +1211,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Another routine will help collecting partial results for the WER reports. The ```results_tuple``` is composed of an array of the original labels, an array of the corrsponding decodings, an array of the corrsponding distances and an array of the corresponding losses. ```returns``` is built up in a similar way, containing just the unprocessed results of one ```session.run``` call (effectively of one batch). Before splicing them into their corresponding ```results_tuple``` lists, labels and decodings are converted to text. In the case of decodings, for now we just pick the first available path." + "Another routine will help collecting partial results for the WER reports. The ```results_tuple``` is composed of an array of the original labels, an array of the corresponding decodings, an array of the corrsponding distances and an array of the corresponding losses. ```returns``` is built up in a similar way, containing just the unprocessed results of one ```session.run``` call (effectively of one batch). Labels and decodings are converted to text before splicing them into their corresponding results_tuple lists. In the case of decodings, for now we just pick the first available path." ] }, {