Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion site/en/tutorials/audio/simple_audio.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@
"x = x[tf.newaxis,...]\n",
"\n",
"prediction = model(x)\n",
"x_labels = ['no', 'yes', 'down', 'go', 'left', 'up', 'right', 'stop']\n",
"x_labels = ['down', 'go', 'left', 'no', 'right', 'stop', 'up', 'yes']\n",
"plt.bar(x_labels, tf.nn.softmax(prediction[0]))\n",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"plt.bar(x_labels, tf.nn.softmax(prediction[0]))\n",
"plt.bar(label_names, tf.nn.softmax(prediction[0]))\n",

I think instead of hard-coding them here, we can just use the label_names variable that is created earlier, and used throughout this guide (so you need to delete the previous line too).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"plt.title('No')\n",
"plt.show()\n",
Expand Down