Course 4 Week 4 assignment 2 : Kernel dying

My kernel dies every time I run the chunk of code 24. Some problem regarding the style cost.

I think the problem is not from my coding so I would appreciate some hint or solution.


Hey @Guillemhg98. I’m afraid your Ex 3 implementation is incorrect. If you look at the unit test for that function, while it says “All tests passed”, your output would be different than what the expected output is.

Your reshaping for a_S and a_G is incorrect.

Make that fix and let me know how it goes.

I have the same problem after executin the cell:

content_target = vgg_model_outputs(content_image)  # Content encoder
style_targets = vgg_model_outputs(style_image)     # Style encoder
1 Like

Since this thread is two years old, I recommend you start a new thread and include your own description of the issue. One of the current mentors for this course will be able to help you.