diff --git a/docs/tutorials/mnist.ipynb b/docs/tutorials/mnist.ipynb index 943db4ad9..f3974d15e 100644 --- a/docs/tutorials/mnist.ipynb +++ b/docs/tutorials/mnist.ipynb @@ -180,7 +180,7 @@ "\n", "- Loads the raw data from Keras.\n", "- Filters the dataset to only 3s and 6s.\n", - "- Downscales the images so they fit can fit in a quantum computer.\n", + "- Downscales the images so they can fit in a quantum computer.\n", "- Removes any contradictory examples.\n", "- Converts the binary images to Cirq circuits.\n", "- Converts the Cirq circuits to TensorFlow Quantum circuits. " @@ -784,7 +784,7 @@ "source": [ "Next, describe the training procedure to the model, using the `compile` method.\n", "\n", - "Since the the expected readout is in the range `[-1,1]`, optimizing the hinge loss is a somewhat natural fit. \n", + "Since the expected readout is in the range `[-1,1]`, optimizing the hinge loss is a somewhat natural fit. \n", "\n", "Note: Another valid approach would be to shift the output range to `[0,1]`, and treat it as the probability the model assigns to class `3`. This could be used with a standard a `tf.losses.BinaryCrossentropy` loss.\n", "\n", @@ -812,7 +812,7 @@ "id": "5nwnveDiojh7" }, "source": [ - "Second, use a custiom `hinge_accuracy` metric that correctly handles `[-1, 1]` as the `y_true` labels argument. \n", + "Second, use a custom `hinge_accuracy` metric that correctly handles `[-1, 1]` as the `y_true` labels argument. \n", "`tf.losses.BinaryAccuracy(threshold=0.0)` expects `y_true` to be a boolean, and so can't be used with hinge loss)." ] }, @@ -926,7 +926,7 @@ "source": [ "qnn_history = model.fit(x_train_tfcirc_sub,\n", " y_train_hinge_sub,\n", - " batch_size=32,\n", + " batch_size=BATCH_SIZE,\n", " epochs=EPOCHS,\n", " verbose=1,\n", " validation_data=(x_test_tfcirc, y_test_hinge))\n",