W1, assignment 2, sequential model, structure of cods

hello there, I’ve written codes for this sequential happy model, but honestly I’m not sure whether I’m using correct structure for codes or not.
please make me sure about that. here is a screenshot from my codes

Actually you have mixed the 2 different ways to writing the code. The 1st method is as follows

model = tf.keras.Sequential([

and so on. And the second method is as follows

model = tf.keras.Sequential()

and so on. Hope this helps :slight_smile:

1 Like

I don’t think you can use .add inside the square brackets.

helped a lot, thank you so much.