I really don’t know what to do with the happymodel(). I have googled a lot and tried a lot of things but none was working. All of them were stuck in either ZeroPadding2D or Conv2D. It kept giving the same error: invalid syntax. I’m pretty sure all my arguments are correct. Could anyone give a hint? I will appreciate it a lot.
Refer the second code block in The Sequential model. You create the Sequential model by passing the layers as a list to the tf.keras.Sequential class. This is one of the methods to create a model, refer the same link for different methods.
Hi, thanks a lot! The thing is, this is actually one of the sites I referred to. Could you help me check which part goes wrong in the following codes? It gives an invalid syntax error.
If you are using the Sequential model, then you don’t have to add the tf.keras.Input layer to it (its used in the Function API later in the assignment though), you can just pass in the shape of the input as an argument to the tfl.ZeroPadding2D layer (argument is input_shape=)
In the Conv2D layer, you haven’t passed the filter size yet, the argument is kernel_size=