C5-W-1A2, function 'model' got passing the tests

Hello,

This is first part of the output for my function ‘model’

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] 

I am getting the following output at the final iteration:

Iteration: 22000, Loss: 20.578871

Hutusaurus
Euca
Eustrioppn
Hocamptopanceus
Xuspeodon
Elacropechus
Uspeodon

as opposed to expected output:

Iteration: 22000, Loss: 22.728886

Onustreofkelus
Llecagosaurus
Mystolojmiaterltasaurus
Ola
Yuskeolongus
Eiacosaurus
Trodonosaurus

I have checked that the learning parameter is the same as what was asked. The output of X,Y also looks good to me. Any suggestions on what might be going wrong?

There are lots of threads in this forum area about the common issues with the “Dinosaur Island” assignment. Perhaps you can do some research, and reply again if you can’t find anything useful there.

One of the most common mistakes is to use the sorted list of names that is passed as the parameter instead of the “shuffled” list that they generated for you in the template code.

1 Like

Yes, those are the exact wrong outputs you get if you make the mistake that I just described:

Iteration: 22000, Loss: 20.578871

Hutusaurus
Euca
Eustrioppn
Hocamptopanceus
Xuspeodon
Elacropechus
Uspeodon


last_name Uspeodon

Here’s another thread about that.

Thank you very much. Indeed this was the problem.

1 Like