Second assignment of first week, DLS course 4

Sorry, but I think that error has everything to do with your code. The best idea would be to spend 15 minutes studying this thread which gives a much nicer explanation of how the Keras Sequential and Functional APIs work than what is given to us in the notebook. Then go back and re-examine your code with that knowledge in mind and I hope that things will be a lot clearer.