title: What is x_train.reshape() and What it Does?
body: <p>Using MNIST Dataset</p>
  
  <pre><code>import numpy as np
  import tensorflow as tf
  from tensorflow.keras.datasets import mnist
  
  # MNIST dataset parameters
  num_classes = 10 # total classes (0-9 digits)
  num_features = 784 # data features (img shape: 28*28)
  
  (x_train, y_train), (x_test, y_test) = mnist.load_data()
  
  # Convert to float32
  x_train, x_test = np.array(x_train, np.float32), np.array(x_test, np.float32)
  
  # Flatten images to 1-D vector of 784 features (28*28)
  x_train, x_test = x_train.reshape([-1, num_features]), x_test.reshape([-1, num_features])
  
  # Normalize images value from [0, 255] to [0, 1]
  x_train, x_test = x_train / 255., x_test / 255.
  </code></pre>
  
  <p>At the <strong>15th Line</strong> of these Code which is, </p>
  
  <p><code>x_train, x_test = x_train.reshape([-1, num_features]), x_test.reshape([-1, num_features])</code>. I can't Understand what these reshaping really does in our Dataset..?? Please Explain me.</p>