Skip to content

Commit

Permalink
Update quantum_data.ipynb (tensorflow#542)
Browse files Browse the repository at this point in the history
per issue 479
removed unnecessary application of newaxis (update to lines 184 & 287)
typo fix (line 613)
  • Loading branch information
gatorwatt authored Apr 14, 2021
1 parent 238c3e1 commit d3c5bbf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/tutorials/quantum_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
"(x_train, y_train), (x_test, y_test) = tf.keras.datasets.fashion_mnist.load_data()\n",
"\n",
"# Rescale the images from [0,255] to the [0.0,1.0] range.\n",
"x_train, x_test = x_train[..., np.newaxis]/255.0, x_test[..., np.newaxis]/255.0\n",
"x_train, x_test = x_train/255.0, x_test/255.0\n",
"\n",
"print(\"Number of original training examples:\", len(x_train))\n",
"print(\"Number of original test examples:\", len(x_test))"
Expand Down Expand Up @@ -284,7 +284,7 @@
"source": [
"print(y_train[0])\n",
"\n",
"plt.imshow(x_train[0, :, :, 0])\n",
"plt.imshow(x_train[0, :, :])\n",
"plt.colorbar()"
]
},
Expand Down Expand Up @@ -610,7 +610,7 @@
"id": "yNliqKFdYacD"
},
"source": [
"Chooe some qubits and prepare the data encoding circuits:"
"Choose some qubits and prepare the data encoding circuits:"
]
},
{
Expand Down

0 comments on commit d3c5bbf

Please sign in to comment.