Reshaping changes an array’s dimensions without changing its stored values. For neural-network input, a 28-by-28 MNIST image can be reshaped into a vector of 784 values by joining its rows. section 10.3
Flattening MNIST images
Use NumPy’s `reshape(-1, 28*28)` on the training and test images to turn each image into a 784-value vector. section 10.3
Figure 10.24 Before training the neural network, we preprocess the images and the labels in the following way. We shape the rectangular image into a long vector by concatenating the rows. We then convert each label into a vector of length 10 with only one non-zero entry in the position of the corresponding label.
Shows image rows concatenated into a long vector before neural-network training. section 10.3


