Gradient with respect to gates

As we saw when we discussed LSTM cells, calculating gradients of loss with respect to all the weights requires the gradients of all the gates and content state. So, first, we will see how to calculate them.

In the upcoming calculations, we will be using the gradients of loss with respect to the hidden state, , which is at multiple places, so we will see how to calculate that. Computing the gradients of loss with respect to the hidden state, , is exactly the same as we saw in the LSTM cell, and can be given as follows: ...

Get Hands-On Deep Learning Algorithms with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.