Why have the shapes of Y changed from (num classes x training examples) to (training examples x classes)

Basically, earlier we were told to always have training examples in columns, but now they are again rows? This is so confusing

I think I mentioned this on your other thread. It turns out that this is a convention that you get to choose. Prof Ng chose features x samples in Course 1 and Course 2 up to this point. But in TF/Keras, they have chosen to have samples as the first dimension. The reason is that things there are generalized to handle arrays with more than 2 dimensions. Once you get to ConvNets and images being treated as h x w x c tensors, it is less confusing to have samples as the first dimension.

1 Like