-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Wrong x-axis label order #2212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong x-axis label order #2212
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
"plt.title('No')\n", | ||
"plt.show()\n", | ||
|