C2w1 are there hints also ValueError

Are there hints available for course 2 week 1 problem set? I’m getting ValueError and it is highlighting
name =“my_model]”

Can you please share the whole error traceback by taking a screenshot of it?

Raymond

{code removed by mentor}

Thank you for your response. Do you know if hints are available?

Hi @Joshua_Neft

There aren’t an attribute in dense function called name so remove these names in dense functions, also there are an final layer you want to implement it like what you had done for the previous layers(surely without using attribute name​:grinning: ) but number of units is different in this final layer

Cheers,
Abdelrahman

Thank you ,big time!
I did notice the missing last layer, one neuron, but totally missed the name issue. In the previous lab they name the layers as I did.

Personally I didn’t remember that the dense model can have an name attribute as i always search in the tensorflow document but not found but if the name attribute is exist without error it is a great thing that i would put it in my next project, thanks for this note

Cheers,
Abdelrahman

Hello @Joshua_Neft,

If we just focus on this error message

all it says is that the name layer 1 does not comply with the naming rule ^[A-Za-z0-9.][A-Za-z0-9_.\\-/]*. In simple words, we can’t use space. If you remove the space in layer 1 and layer 2, it should pass.

Another way would be to just drop the name attribute, and if you drop it, Tensorflow will assign a name automatically.

Cheers,
Raymond

PS: Even though you won’t find the name attribute in the documentation of tf.keras.layers.Dense, since it inherits the tf.keras.layers.Layer class, it inherits the name argument from it as well.

Inheritance makes everything complicated.

This is part of what I was working off of:
{ code removed by mentor }

It looks like you have passed through that cell. Great job!

Cheers,
Raymond

PS: I removed your code since we can’t share assignment code here.