Hello there!
All was going well in the Dinosauraus sequence model assignment.
But in Exercise 2 I am seeing the error:
Sampling:
list of sampled indices:
[23, 7, 15, 26, 25, 23, 21, 14, 23, 23, 7, 16, 26, 24, 18, 14, 10, 0]
list of sampled characters:
['w', 'g', 'o', 'z', 'y', 'w', 'u', 'n', 'w', 'w', 'g', 'p', 'z', 'x', 'r', 'n', 'j', '\n']
---------------------------------------------------------------------------
..
...
AssertionError: Wrong values
I can see that the values are nonsense. I’ve checked and re-checked for bugs, and I can’t find any. I wonder whether there is something quite fundamental in the exercise that I’m not understanding.
The assignment gives hints on how to use ravel but I don’t see any need to. I wonder whether this is a clue to where I’m going wrong?
This is my step 3, which I think might be where the problem lies?
# Step 3: Sample the index of a character within the vocabulary from the probability distribution y
# (see additional hints above)
idx = np.random.choice(range(vocab_size), p = y[:,counter])
# Append the index to "indices"
indices.append(idx)
Any pointers would be appreciated!