From d3c5bbf910298efdd930975c605acc6461b29752 Mon Sep 17 00:00:00 2001 From: gatorwatt Date: Wed, 14 Apr 2021 02:29:16 -0400 Subject: [PATCH] Update quantum_data.ipynb (#542) per issue 479 removed unnecessary application of newaxis (update to lines 184 & 287) typo fix (line 613) --- docs/tutorials/quantum_data.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/tutorials/quantum_data.ipynb b/docs/tutorials/quantum_data.ipynb index 4705aa151..80a67b8ab 100644 --- a/docs/tutorials/quantum_data.ipynb +++ b/docs/tutorials/quantum_data.ipynb @@ -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))" @@ -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()" ] }, @@ -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:" ] }, {