Error in video: Taking Mean of the Gradients : value of m

In the Python: FeedForward neural network module, in the second video at around 2:45min sir explained that we need to take the mean of the gradients, and code included m = X.shape[1] where X has the shape of the following form [number of data points, features]. Should m not be , m = X.shape[0] ?
Also, I performed the same experiment with m = X.shape[0], the FFN is not learning well. Please check it notebook provided with the download material. The model is not working as expected, the loss with m = X.shape[0] is very high and even with a high number of epochs, the model is not converging. If I take m = X.shape[1] which is averaging with the number of features(which is actually wrong) the model converges. Please explain

Yes, it should have been X.shape[0] please mark it at your end. For convergence, please tune in the hyper-parameters a bit accordingly, it will reflect back towards the loss.