DLS Course4 W1 Convolution_model_Application happyModel()

Here is my code for happyModel(), but it has TypeError: unsupported operand type(s) for %: ‘tuple’ and ‘int’, referring to “tfl.Conv2D(filters=(7,7),kernel_size=32,strides=(1,1))”. Could anyone help me find out the bug?

def happyModel():
{mentor edit: code removed}

Take a look at your Conv2D layer specification and compare to the guidance in the notebook [ 32 7x7 filters ] and the parameters defined in the doc


filters Integer, the dimensionality of the output space (i.e. the number of output filters in the convolution).
kernel_size An integer or tuple/list of 2 integers, specifying the height and width of the 2D convolution window. Can be a single integer to specify the same value for all spatial dimensions.

Thank you soo much, the problem solved!

1 Like

Please do not post your code on the Forum. That breaks the course Honor Code.

1 Like

Sorry it’s my first time to creat a topic, not familiar with the rules, but it’s my mistake to post the code on the Forum, will not do it again.