Skip to content

Commit 3e3125b

Browse files
committed
Minor sharpening
1 parent 5ecc7a1 commit 3e3125b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

code/mnist_loader.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121

2222

2323
def load_data():
24-
""" Return the MNIST data as a tuple containing the training data,
24+
"""Return the MNIST data as a tuple containing the training data,
2525
the validation data, and the test data.
2626
2727
The ``training_data`` is returned as a tuple with two entries.
2828
The first entry contains the actual training images. This is a
2929
numpy ndarray with 50,000 entries. Each entry is, in turn, a
3030
numpy ndarray with 784 values, representing the 28 * 28 = 784
31-
pixels.
31+
pixels in a single MNIST image.
3232
3333
The second entry in the ``training_data`` tuple is a numpy ndarray
3434
containing 50,000 entries. Those entries are just the digit
@@ -38,10 +38,10 @@ def load_data():
3838
The ``validation_data`` and ``test_data`` are similar, except
3939
each contains only 10,000 images.
4040
41-
This is a nice and convenient data format, but for use in neural
42-
networks it's actually helpful to modify the format of the
43-
``training_data`` a little. That's done in the wrapper function
44-
``load_data_wrapper()``, see below.
41+
This is a nice data format, but for use in neural networks it's
42+
helpful to modify the format of the ``training_data`` a little.
43+
That's done in the wrapper function ``load_data_wrapper()``, see
44+
below.
4545
"""
4646
f = open('../data/mnist.pkl', 'rb')
4747
training_data, validation_data, test_data = cPickle.load(f)
@@ -50,8 +50,8 @@ def load_data():
5050

5151
def load_data_wrapper():
5252
"""Return a tuple containing ``(training_data, validation_data,
53-
test_data)``. Based on ``load_data``, but the format is a little more
54-
convenient for use in neural networks.
53+
test_data)``. Based on ``load_data``, but the format is more
54+
convenient for use in our implementation of neural networks.
5555
5656
In particular, ``training_data`` is a list containing 50,000
5757
2-tuples ``(x, y)``. ``x`` is a 784-dimensional numpy.ndarray

0 commit comments

Comments
 (0)