C4 W4 UNQ_C5 Train_step error

Hey guys, I’m having the following error:

All the previous steps were correct and passed by the grader. And the code is only using the functions that I wrote before (except vgg_model_outputs, which was given)

vgg_model_outputs(generated_image)
compute_style_cost(a_S, a_G)
compute_content_cost(a_C, a_G)
total_cost( J_content,J_style)

Any thoughts?

Found the problem!! apparently, my compute_content_cost function was wrong. The odd thing is that it passed the grader test before and after the fix :sweat_smile:

Thank you

Interesting. Well, costs should never be negative by definition, right? Are you sure it wasn’t a problem like the one documented on this thread?