C2_W2 practice lab error: syntax error

It is shown that there is a syntax error in the statement of ‘Dense’. But the syntax is correct in my knowlegde. Pls help me.

Hi. Please check how you import your modules. Did you import the Dense function? If not the syntax might be tf.keras.Dense

Let me know if this helps

I have imported Dense using this instruction
from tensorflow.keras.layers import Dense

Ok. In that case can you verify that you have after each layer a , at the end?

I have added commas now. But now it is showing EOF error

Is it required to add model.compile instruction? I didn’t added that.

Can you please check you close the parenthesis after “my_model”?

Ok sir… I have inserted the parenthesis. Thank you sir… Now its ok.