Course 2 week 3 Assigment: train the model

You shouldn’t need to change any of that model code, but it looks like you must have accidentally broken some of it related to the tf.GradientTape logic. Are you sure you didn’t mess with the guts of that function? You can get a clean copy and compare. There’s a topic about that on the FAQ Thread.