C5 w1a2 Dinosaur sample Y dimension

in question UNQ_C2 of course 5 week 1 Assignement 2 .

I don’t understand why Y have dimension nb_characters , 100.
I can track it to a blowing up to (100,100) dimension however this is really puzzling .

there is a hint that say that y should be a 2d vectors , however the np.ravel function doesn’t help in determining what to do with y and its 100 vectors of probability.

in the class the dimension of a was not really touched upon and several time they were mention of using a dense network , then a softmax to make sense of y.

1 Like

i found the issue . if X or a are loosely initiated as one dimension vectors the broadcasting blow up a to (n_a,n_a) matrix instead of a (n_a,1) vector. it can happen at two different time as x can be defined twice