[W1A2E4] Model() - Wrong expected output: Loss drops too quickly

Hello,

I get a wrong expected output for this exercice. The loss is dropping too quickly and then coming back up, and I actually end up with a loss inferior to what’s expected, but my output is different to what is expected.

It starts like this:

Ends up like this:

I get dope dinosaur names so that’s great but I still cannot complete the exercice ^^

Thank you for any help,

Axel

Hey @Axelibnida,
Are all the previous test cases passing in your notebook? If yes, then can you please DM your notebook as an attachment to me?

Cheers,
Elemento

1 Like

@Elemento yes, all previous tests did pass. I sent you my notebook by DM :slight_smile:

@MPA I actually did modulo of (j + length of the examples) over length of the examples, which is actually a bit silly now that I look at it, anyway it does same as what you told me. I still tried with yours but I have the same result.
I tried printing j’s to make sure it correctly went from 1 to 26 and back again to 1, and it does.

Hey @Axelibnida,
Marnix has pointed you in the right direction. When you are calculating the idx, the index is supposed to iterate over the examples, i.e., the list of all the dinosaur names. In simple words, it should be as follows;

idx = j % len(examples)

instead of;

idx = j % vocab_size

Let me know if this helps.

Cheers,
Elemento