# Reshape the training examples
train_x_flatten = train_x_orig.reshape(train_x_orig.shape[0], -1).T
# The "-1" makes reshape flatten the remaining dimensions
# Standardize data to have feature values between 0 and 1.
train_x = train_x_flatten/255.