Dinosaur exercise assertion error course5 w1 ex2

I am getting an assertion error for the last part of the exercise.

The single example output is:

j = 0 idx = 0
single_example = aachenosaurus
single_example_chars [‘a’, ‘a’, ‘c’, ‘h’, ‘e’, ‘n’, ‘o’, ‘s’, ‘a’, ‘u’, ‘r’, ‘u’, ‘s’]
single_example_ix [1, 1, 3, 8, 5, 14, 15, 19, 1, 21, 18, 21, 19]
X = [None, 1, 1, 3, 8, 5, 14, 15, 19, 1, 21, 18, 21, 19]
Y = [1, 1, 3, 8, 5, 14, 15, 19, 1, 21, 18, 21, 19, 0]

The last output is:

Iteration: 22000, Loss: 20.578871

Hutusaurus
Euca
Eustrioppn
Hocamptopanceus
Xuspeodon
Elacropechus
Uspeodon

NOTE: I shut down the project and restarted. Upon re-executing, I had the same error.

Can you take a look at my code?

Please post the assert log.


AssertionError Traceback (most recent call last)
in
1 parameters, last_name = model(data.split("\n"), ix_to_char, char_to_ix, 22001, verbose = True)
2
----> 3 assert last_name == ‘Trodonosaurus\n’, “Wrong expected output”
4 print("\033[92mAll tests passed!")

AssertionError: Wrong expected output

UPDATE: I figured it out. Upon reading the instructions more carefully, I saw that I should be drawing data from “examples”, and not “data_x”.

Thanks for the update.