W1 Ass.2 Dinosaurus

Hello,
My code seems allright but still getting the following error:


I need a hint for my problem although my Y values are correct which starts with X[1] and ends with the number for ‘\n’. Can anyone please give a hand here?

Hi @Vahdet_Vural ,

It looks like there is a problem with the optimize() function. Could you send me a direct message with the code for optimize() and model(). I will have a look for you.

Hi @Vahdet_Vural ,

Both optimze() and model() seemed fine. Looking at the dino name output, there is problem with the name generated. I could put my finger on what might be the cause. I suggest you refresh the kernel and rerun the code:

Kernel → restart & clear all output
Cell → run from start

I have done it and unfortunatley i got the same results as before. It is really annoying that the code looks fine but apparently somehow some quantum effect is sneaking into the game :D.
could it be because of the sample() function in the model()? Have you tried my code in your notebook? If , in this case, you get the same results as I do, then probably the issue could be because of my sample() function.

Hi @Vahdet_Vural

It could be the sample() and get_sample(). If you send me a DM with these two functions, I will have a look for you.

Hi @Vahdet_Vural ,

The problem is in sample() at step 3, the range to sample is from the y distribution, but the size has to be within the vocabulary size, but you have set that to len(y).

Hey Kic,
I have now set the range to range(vocab_size) but unfortunately the result is the same.
Was it what you meant?
I mean since len(y) and len(vocab_size) are the same, at least in that task, it should not change the result either.

Did you refresh the kernal and rerun the code. I am offline now. If you still have problem, I will have a look tomorrow.

Hey Kic,
yes I did the refreshing and rerun the codes. However I am getting the same error. Do want to see maybe the whole notbeook? I can send you the Jupiter file.

HI @Vahdet_Vural ,

yes, send me the notebook.

Hi @Vahdet_Vural

I have taken the following functions from your notebook and placed them in my notebook, and they worked fine, and I got the dino names generated without any problem. So I don’t know what might be the problem. The functions that I have taken from your code are:
clip()
sample()
optimize()
model()

I suggest you try again by refreshing the kernel and clear all output, rerun all the code and see what happens.

Hex Kic,
unfortunatley i am getting the same results.
But what about the wrong generation of names after 16000th iteration you mentioned before?

Hello @Vahdet_Vural,

  1. can you share here a screenshot of the latest results you have got?
  2. please check the private message I have sent to you.

Raymond

here is the results i am getting:

my all otehr previous functions pass the tests but this dino name one is annoying.
But thanks alot for the help!

Hi @Vahdet_Vural ,

I have just done another test, taken every functions from your notebook and ran successfully without any problem. So I am not sure what is happening at your end.
The 16000th iteration is done when I compare my output against yours based on the output on your notebook.
If the code managed to generate dino names up to that point, what could possibly be the cause?
How could the same function run pass 16000th iteration and generate dino names correctly to the end when the lab is run under my workspace?

Try load this copy and run on your workspace to see what happens.
file removed in respect for honour code policy

Hey Kic,
now it is working but only when I worked on Coursera notebook, otherwise your copy does still not work on my notebook.
Here is the happy end with the correct dino name.

However I still dont understand what can account for this problem. As you mentioned, up to 1600 th iteration all is good but then it is disturbed!

Hi @Vahdet_Vural ,

I am pleased that finally your assignment is working and can submit to the grader.

How I wish you have made clear at the first instance that you were working outside of the Coursera’s platform. We could not possibly know what your setup is, and we could not replicate that environment to duplicate the fault. It has taken me quite a bit of time to analyse what the problem might be.

Hey Kic,
yes it is my bad that I have not made it clear from the beginning but as you can also admit , the packages or the functions that are used in the assignment are quite the basic ones and I havent assumed that working on a different notebook can cause any error because of any uptaded version.
I mean I would still love to understand what causes the drastic deviation from the right track during the iteration although all the seeds are the same.
But yes next time i will definitely point out on that.
i am so sorry about the time you have lost, and I appreciate your effort