Sequence Models - W1, Assignment 2 (Dinossours)

It´s very difficult to understand what happens with my exercise. I runs all right, but the expected output (dinossour names) is different from my output. I don’t know what else I can check to find the mistake.

Iteration: 22000, Loss: 12.631032

Ostyops
Nokaceratochubuhimamacterus
Nynurus
Opeacops
Osshor
Nocaurus
Ossaurus


---------------------------------------------------------------------------
AssertionError                            Traceback (most recent call last)
<ipython-input-36-725c093d6b91> in <module>
      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

My code is:

### START CODE HERE ###

    # mentor edit: code removed
        
### END CODE HERE ###

First, please don’t share your code on the forum. That’s not allowed by the Code of Conduct.

If a mentor needs to see your code, we’ll contact you wiht instructions.

Tips:
Two errors here (just to get you started on what to look for):

  • The first one should just use ‘j’ and the length of “examples”, not the size of the vocabulary.
  • The second one should iterate over the characters in the example.

Thank you