I am getting stuck in exercise 8 (linear_activation_backward). I do not understand what linear_cache and activation_cache are and what they are supposed to contain. I, of course, cannot post any code here, so I hope this suffices for now as an explanation of my problem.
I would be very grateful if someone could help me out.
Those values are created during the forward propagation steps. The first thing to do is go back and study that logic in linear_activation_forward and how it calls the lower level routines linear_forward, sigmoid and relu.
At each forward layer, you get a cache value that looks like this:
cache = ((A, W, b), Z)
So it is a “2-tuple” and the first element of it is a “3-tuple” (the “linear cache”).
Then L_model_forward creates a list of those cache values from all the layers.