hey I’m getting this error on the choice part of the code:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-78-a13d660e654a> in <module>
19 print("\033[92mAll tests passed!")
20
---> 21 sample_test(sample)
<ipython-input-78-a13d660e654a> in sample_test(target)
7
8
----> 9 indices = target(parameters, char_to_ix, 0)
10 print("Sampling:")
11 print("list of sampled indices:\n", indices)
<ipython-input-77-323a9e4e9818> in sample(parameters, char_to_ix, seed)
58 # Step 3: Sample the index of a character within the vocabulary from the probability distribution y
59 # (see additional hints above)
---> 60 idx = np.random.choice(list(range(0, vocab_size)), p = y.ravel())
61
62 # Append the index to "indices"
mtrand.pyx in numpy.random.mtrand.RandomState.choice()
ValueError: 'a' and 'p' must have same size
y have a shape (27, 100)
is the problem in how I’m calling choice or the problem is in the y calculation?