Getting wrong result in dinosaur name assignment (week 1)

In the dinosaur name programming assignment, all the test past except at the very end (# GRADED FUNCTION: model):

My output is
Iteration: 22000, Loss: 14.642888

Omaqosaurus
Omala
Otarailosaurus
Omaldor
Tods
Ogantor
Ssagonelesirosaurus

which generates an AssertionError of the test:

----> 3 assert last_name == ‘Trodonosaurus\n’, “Wrong expected output”

I understand that it’s not quite enough info, but do you have any idea what might be wrong in my code?

Hi @psv,

restart the kernel and clear all output. Run all cells.

Thanks a lot, unfortunately it didn’t help, I’m still getting the same result.

Problems in this exercise often come from the code that creates the single_example_ix value.

Hi @TMosh but as you can see in the print out, the single_example_ix is correct!

j = 0 idx = 0
single_example = turiasaurus
single_example_chars [‘t’, ‘u’, ‘r’, ‘i’, ‘a’, ‘s’, ‘a’, ‘u’, ‘r’, ‘u’, ‘s’]
single_example_ix [20, 21, 18, 9, 1, 19, 1, 21, 18, 21, 19]
X = [None, 20, 21, 18, 9, 1, 19, 1, 21, 18, 21, 19]
Y = [20, 21, 18, 9, 1, 19, 1, 21, 18, 21, 19, 0]

So I don’t really understand the source of error

I did not say that single_example_ix was the only area where mistakes are possible.