Week 1 Assignment 2 Exercise 4 - wrong names are generated

I completed the first 3 exercises of the Dino name assignment and the tests seem to be ok.

However the model does not generate the expected dino names. The code runs, but my output is

Iteration: 22000, Loss: 20.578871

Hutusaurus
Euca
Eustrioppn
Hocamptopanceus
Xuspeodon
Elacropechus
Uspeodon

I want to fix the problem, but I am not sure where to start. Any tipps or suggestions?

Kind regards
Susanne

Are you getting any error? If so, please share that with us.

No errors unfortunatly, appart from the “Wrong expected output”

Are you sure that you used the randomly “shuffled” inputs that they create for you in the template code, instead of just using the inputs in the order in which they are given?

Yes, I just refreshed my memory by trying the mistake that I described earlier (just using data_x directly instead of the “shuffled” version that they create for you) and I get exactly the output you showed:

Iteration: 22000, Loss: 20.578871

Hutusaurus
Euca
Eustrioppn
Hocamptopanceus
Xuspeodon
Elacropechus
Uspeodon


last_name Uspeodon

They do the random shuffle just to make the results more interesting and less predictable. But of course things are still “predictable” here, because they set the random seeds exactly to make it easy to write test cases and the grader. You wouldn’t do that in a “real” system. :nerd_face:

1 Like

Thanks, i understand the problem now :slight_smile: