I have a question about Week 2 Optimization Methods Programming Assignment. There is a funciton random_mini_batches
:
def random_mini_batches(X, Y, mini_batch_size = 64, seed = 0):
...
shuffled_Y = Y[:, permutation].reshape((1, m))
...
What is the purpose of reshape there? Applying permutation doesn’t change the shape of Y.