Week 3 - assignment - exercise 8: nn Model

Hi,

I am having this error messages when it is in the parameters part in the nn model:

image

image

I was suggested to review my parameters function which should be a dictionary but I checked it and my parameters function is a dictionary as shown below:

Any help is appreciated.

Patricia

Already answered in another thread earlier today.

This one:

Yes, you replied that my parameters are not a dictionary but they are a dictionary …I ran type on it and it is a ‘dic’ as I showed you in this new topic.

I passed the assignment but I want to know where is my error just to learn.

Thanks,

Patricia

The error message references that “W1” is being used as an index to a tuple.

Hello, @plarosa,

To do that check, it would be better to insert the print statement right before the line of error:

You put the check after the definition of a function, which means that, when you run that code cell, Python does two things: (1) it defines the function without running the function; (2) it prints the type of the parameters stored in the memory. Note that for (2), we don’t know which parameters it is and it could be just a parameters that was defined for one of our earlier tests, such as the following for exercise 6:

Therefore, your check isn’t conclusive as to why you got that error, but now that you have passed the assignment, I wonder if you were still able to reproduce the error for investigation…

Cheers,
Raymond

Hi Raymond,

Yes, I was able to do that and indeed my parameters are a tuple:

gosh!!.I found my error!!!

Thanks….I was really calling the wrong function….

Patricia

2 Likes

Hello Patricia, great work finding it out! :wink: :wink: :wink:

Cheers,
Raymond