Hi everyone,
I’m stuck with the model() function in the dinosaur name character level language model programming exercise.
The unit test throws the following error:
----> 3 assert last_name == 'Trodonosaurus\n', "Wrong expected output"
4 print("\033[92mAll tests passed!")
AssertionError: Wrong expected output
Looking at the debugging information, this seems to be a problem with the indexing since one of the sampled names in the list printed at iteration 2000 appears to be an empty string. The index itself looks like it’s behaving fine though:
j = 1535 idx = 1535
j = 1536 idx = 0
Iteration: 2000, Loss: 27.852178
Aseulusliarlesaurus
Lonntiaopntoisozrumus
Iecelprimonesaurus
Anntidcmptolaxrasxus
Ecelsaurusasaulnhasaurlacmesston
Ceinanos
Does anyone have any ideas as to what might be going wrong? Last name at iteration 22k is “Ceanosaurus”
Thank you!
Jacky