C4 W1 assigment 2

Yes, the commas that Tom points out are a serious problem. That has the effect of making the RHS a “tuple”, which is why it adds the 5th dimension.

You need the commas in the Sequential API because you are constructing a list of instantiated layer functions, but they are a disaster in the Functional API because you are just invoking instantiated layer functions there. It might help to spend a bit of time reading this thread, which gives you a much nicer explanation of the Sequential and Functional APIs than we get in either the lectures or the assignment itself.