Course 4 : Week 2 : Programming Assignment 2

Hey, my assignment seems to be passing all test cases in the notebook, but autograder shows the grade as 0
Could not seem to find the compile error
Auto grader output

Cell #UNQ_C2. Can’t compile the student’s code. Error: SyntaxError(‘invalid syntax’, (‘/tmp/student_solution_cells/cell_15.py’, 60, 24, ’ prediction_layer = \n’))

new error i seem to be getting

Cell #16. Can’t compile the student’s code. Error: TypeError(“‘Tensor’ object is not callable”)

Happy to share the code if needed

Also, working perfectly in the local notebook.

Have you searched the Forum for the phrase “compile student’s code”? It might be useful.

Hey ,
Ya checked out the post on general errors as well as tried to find any specific solution.
The first one had happened because of a template code change and checked for others as well.
Did not find the solution for the problem though. Still persists

Hi, I have the same issue, and on a local code works fine. How did you resolve it?

Continuing the discussion from Course 4 : Week 2 : Programming Assignment 2:

hey , changed my code to prediction_layer = tf.keras.layers.Dense(1,activation='linear') rather than prediction_layer = tf.keras.layers.Dense(1,activation='linear')(x) in prediction layer

Cell #16. Can’t compile the student’s code. Error: AssertionError(‘Do not remove the @tf.function() modifier from the function’)

facing same issue . please help