Cache concept problem

Hi all. I do not understand the cache concept in the neural network programming. Is it possible one please explain the cache concept to me (which in the video referred to “containing Z”)?
Why we use cache in python? How the python consider the cache as a vectorized form?

Thanks in advance

Hi @simamh,

Excellent question. The cache exists in order to speed up calculations during backpropagation. For example, the activation matrix A[l - 1] is always used to calculate dJ/dW[l] = 1/m * dZ[l] A[l - 1]^T. We cache A[l - 1] in a python dictionary during forward propagation. It is only a key-value store that enables fast retrieval.

2 Likes

Many thanks for your explanation.

1 Like