Course 4 Week 4 Assignment 2 kernel keeps dying

I’m going through W4A2 in course 4 (CNNs) and my kernel keeps dying off. It seems to happen immediately after I run the cell:

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

I think all exercises before that cell are correct (‘All tests passed!’). Any recommendation would be much appreciated

Its important to look for code that keeps running for a long time or uses a lot of memory/cpu that ends the kernel. I would have a look at the code again!


If you think your code is correct then try running it at a different time. This user tried for a different time and succeed. Or perhaps try rebooting by clicking on the “Help” on the top right and when the panel opens, click on “Reboot”.

Meanwhile, you can submit your assignment as grader doesn’t need the output of your code.