I am working on sample() and found that y(i)<t+1> has the shape of (27, 100). Why 100 probability values in the second dimension? I expect it to have shape (27, 1) or (1,27) with one probability for each character. How to random sample with this shape?
Hello @khteh,
Yes, your expectation is right and I got (27, 1), so there must be something in your code.
My suggestion is that you can print the shapes of the given parameters, and also the shapes of the intermediate variables a, z and y and see which one goes wrong.
Cheers,
Raymond
