# Need help to understand backpropagation for gated recurrent units (GRU)

I'm stuck regarding the implementation of backpropagation in a binary classification task using a GRU. I wanted to know if someone could tell me how to proceed. I was able to understand how BP works in a simple RNN because it is very similar to an MLP. However, I don't know how to do it in the context of a GRU.

Let's say we want to use a GRU RNN for our binary classification task, i.e. $$y_{true} \in \{0, 1\}$$.

We have the following Gated recurrent unit

\begin{equation*} \begin{aligned} \Gamma_{r}^{} & = \sigma\left(\gamma_{r}^{}\right) = \sigma\left(U_r \; a^{} + W_r \; x^{} + b_r\right) \\ \\ \Gamma_{u}^{} & = \sigma\left(\gamma_{u}^{}\right) = \sigma\left(U_u \; a^{} + W_u \; x^{} + b_u\right) \\ \\ C^{} & = tanh\left(c^{}\right) = tanh\left(U_c \left(\Gamma_{r}^{} \odot a^{} \right) + W_c \; x^{} + b_c\right) \\ \\ a^{} & = \left(1-\Gamma_{u}^{}\right) \odot a^{} + \Gamma_{u}^{} \odot C^{} \end{aligned} \end{equation*}

Only at the final time $$T$$, we compute

$$\begin{equation*} \begin{split} v^{} & = W_{ya} a^{}+b_{y}, \\ \\ y^{} & = \sigma\left(v^{}\right). \end{split} \end{equation*}$$

Hence, the loss function is only computed at the final time $$T$$ over a single training example as

$$\mathcal{L} = - \left[y_{true} \times ln \left(y^{}\right) + \left(1-y_{true}\right) \times ln \left(1-y^{}\right)\right].$$

The activation functions are $$\sigma(x) = \frac{1}{1+e^{-x}}$$ $$tanh(x) = \frac{e^{x}-e^{-x}}{e^{x}+e^{-x}}$$

The question is, how can I compute the derivatives w.r.t. all the parameters?