The output for this exercise should be tf.reduce_sum(tf.square(a_C_unrolled-a_G_unrolled))/2
but this computes a value too high according to the assert
statements in the grader. Instead
tf.reduce_sum(tf.square(a_C_unrolled-a_G_unrolled))/n_H/ n_W/ n_C/4
gives us the correct value.
What is happening here !? In the course videos the content loss was defined just with a denominator of 2 ie.
{\cal J}_{content}(a_C, a_G) = \frac12||a_C - a_G||_F^2