Skip to main content

Explaination Explaining GRU equationequations from two sources

I really confused about how GRU computation really works. I am not really good at math btw.

I read the original source of GRU equationequations from Cho, et al. (2014), and also a Colah's blog post on the same topic. 

And somehow, GRU equationequations at Colah's blog post http://colah.github.io/posts/2015-08-Understanding-LSTMs/ LSTM Networks hasare different equation with thatthan equations in the Cho's original paper Learning Phrase Representations using RNN Encoder–Decoder for Statistical Machine Translation.

This isThese are the equationequations from colahColah's blog:

$z_t = \sigma(W_z \cdot [h_{t-1},x_t])$$$z_t = \sigma(W_z \cdot [h_{t-1},x_t])$$

$r_t = \sigma(W_r \cdot [h_{t-1},x_t])$$$r_t = \sigma(W_r \cdot [h_{t-1},x_t])$$

$h_t = (1-z_t) \ast h_{t-1} + z_t \ast \tilde{h}_t$$$h_t = (1-z_t) \ast h_{t-1} + z_t \ast \tilde{h}_t$$

$\tilde h_t = tanh(W \cdot [r_t \ast h_{t-1}, x_t]_j)$$$\tilde h_t = tanh(W \cdot [r_t \ast h_{t-1}, x_t]_j)$$

This isThese are the equationequations from the original paper:

$z_j = \sigma([\mathbf W_z \mathbf x]_j + [\mathbf U_z \mathbf h_{(t-1)}]_j)$$$z_j = \sigma([\mathbf W_z \mathbf x]_j + [\mathbf U_z \mathbf h_{(t-1)}]_j)$$

$r_j = \sigma([\mathbf W_r \mathbf x]_j + [\mathbf U_r \mathbf h_{(t-1)}]_j)$$$r_j = \sigma([\mathbf W_r \mathbf x]_j + [\mathbf U_r \mathbf h_{(t-1)}]_j)$$

$h_j^{(t)} = z_jh_j^{(t-1)} + (1-z_j) \tilde h_j^{(t)}$$$h_j^{(t)} = z_jh_j^{(t-1)} + (1-z_j) \tilde h_j^{(t)}$$

$\tilde h_j^{(t)} = \phi([\mathbf W \mathbf x]_j + [\mathbf U(\mathbf r \odot h_{(t-1)})]_j)$$$\tilde h_j^{(t)} = \phi([\mathbf W \mathbf x]_j + [\mathbf U(\mathbf r \odot h_{(t-1)})]_j)$$

Can someone explain that it is equal to equation with thatif Colah's equations are the same as the equations in the paper version?

Explaination GRU equation

I really confused about how GRU computation really works. I am not really good at math btw.

I read the original source of GRU equation from Cho, et al. (2014). And somehow, GRU equation at http://colah.github.io/posts/2015-08-Understanding-LSTMs/ has different equation with that in the original paper.

This is the equation from colah blog:

$z_t = \sigma(W_z \cdot [h_{t-1},x_t])$

$r_t = \sigma(W_r \cdot [h_{t-1},x_t])$

$h_t = (1-z_t) \ast h_{t-1} + z_t \ast \tilde{h}_t$

$\tilde h_t = tanh(W \cdot [r_t \ast h_{t-1}, x_t]_j)$

This is the equation from the original paper:

$z_j = \sigma([\mathbf W_z \mathbf x]_j + [\mathbf U_z \mathbf h_{(t-1)}]_j)$

$r_j = \sigma([\mathbf W_r \mathbf x]_j + [\mathbf U_r \mathbf h_{(t-1)}]_j)$

$h_j^{(t)} = z_jh_j^{(t-1)} + (1-z_j) \tilde h_j^{(t)}$

$\tilde h_j^{(t)} = \phi([\mathbf W \mathbf x]_j + [\mathbf U(\mathbf r \odot h_{(t-1)})]_j)$

Can someone explain that it is equal to equation with that in the paper version?

Explaining GRU equations from two sources

I really confused about how GRU computation really works. I am not really good at math btw.

I read the original source of GRU equations from Cho, et al. (2014), and also a Colah's blog post on the same topic. 

And somehow, GRU equations at Colah's blog post Understanding LSTM Networks are different than equations in the Cho's original paper Learning Phrase Representations using RNN Encoder–Decoder for Statistical Machine Translation.

These are the equations from Colah's blog:

$$z_t = \sigma(W_z \cdot [h_{t-1},x_t])$$

$$r_t = \sigma(W_r \cdot [h_{t-1},x_t])$$

$$h_t = (1-z_t) \ast h_{t-1} + z_t \ast \tilde{h}_t$$

$$\tilde h_t = tanh(W \cdot [r_t \ast h_{t-1}, x_t]_j)$$

These are the equations from the original paper:

$$z_j = \sigma([\mathbf W_z \mathbf x]_j + [\mathbf U_z \mathbf h_{(t-1)}]_j)$$

$$r_j = \sigma([\mathbf W_r \mathbf x]_j + [\mathbf U_r \mathbf h_{(t-1)}]_j)$$

$$h_j^{(t)} = z_jh_j^{(t-1)} + (1-z_j) \tilde h_j^{(t)}$$

$$\tilde h_j^{(t)} = \phi([\mathbf W \mathbf x]_j + [\mathbf U(\mathbf r \odot h_{(t-1)})]_j)$$

Can someone explain if Colah's equations are the same as the equations in the paper version?

add equation
Source Link

I really confused about how GRU computation really works. I am not really good at math btw.

I read the original source of GRU equation from Cho, et al. (2014). And somehow, GRU equation at http://colah.github.io/posts/2015-08-Understanding-LSTMs/ has different equation with that in the original paper. It feels like

This is the update gate (z) and h_tequation from colah blog:

$z_t = \sigma(W_z \cdot [h_{t-1},x_t])$

$r_t = \sigma(W_r \cdot [h_{t-1},x_t])$

$h_t = (1-z_t) \ast h_{t-1} + z_t \ast \tilde{h}_t$

$\tilde h_t = tanh(W \cdot [r_t \ast h_{t-1}, x_t]_j)$

This is different with that inthe equation from the original paper to me.:

$z_j = \sigma([\mathbf W_z \mathbf x]_j + [\mathbf U_z \mathbf h_{(t-1)}]_j)$

$r_j = \sigma([\mathbf W_r \mathbf x]_j + [\mathbf U_r \mathbf h_{(t-1)}]_j)$

$h_j^{(t)} = z_jh_j^{(t-1)} + (1-z_j) \tilde h_j^{(t)}$

$\tilde h_j^{(t)} = \phi([\mathbf W \mathbf x]_j + [\mathbf U(\mathbf r \odot h_{(t-1)})]_j)$

Can someone explain that it is equal to equation with that in the paper version?

I really confused about how GRU computation really works. I am not really good at math btw.

I read the original source of GRU equation from Cho, et al. (2014). And somehow, GRU equation at http://colah.github.io/posts/2015-08-Understanding-LSTMs/ has different equation with that in the original paper. It feels like the update gate (z) and h_t is different with that in the paper to me.

Can someone explain that it is equal to equation with that in the paper version?

I really confused about how GRU computation really works. I am not really good at math btw.

I read the original source of GRU equation from Cho, et al. (2014). And somehow, GRU equation at http://colah.github.io/posts/2015-08-Understanding-LSTMs/ has different equation with that in the original paper.

This is the equation from colah blog:

$z_t = \sigma(W_z \cdot [h_{t-1},x_t])$

$r_t = \sigma(W_r \cdot [h_{t-1},x_t])$

$h_t = (1-z_t) \ast h_{t-1} + z_t \ast \tilde{h}_t$

$\tilde h_t = tanh(W \cdot [r_t \ast h_{t-1}, x_t]_j)$

This is the equation from the original paper:

$z_j = \sigma([\mathbf W_z \mathbf x]_j + [\mathbf U_z \mathbf h_{(t-1)}]_j)$

$r_j = \sigma([\mathbf W_r \mathbf x]_j + [\mathbf U_r \mathbf h_{(t-1)}]_j)$

$h_j^{(t)} = z_jh_j^{(t-1)} + (1-z_j) \tilde h_j^{(t)}$

$\tilde h_j^{(t)} = \phi([\mathbf W \mathbf x]_j + [\mathbf U(\mathbf r \odot h_{(t-1)})]_j)$

Can someone explain that it is equal to equation with that in the paper version?

Source Link

Explaination GRU equation

I really confused about how GRU computation really works. I am not really good at math btw.

I read the original source of GRU equation from Cho, et al. (2014). And somehow, GRU equation at http://colah.github.io/posts/2015-08-Understanding-LSTMs/ has different equation with that in the original paper. It feels like the update gate (z) and h_t is different with that in the paper to me.

Can someone explain that it is equal to equation with that in the paper version?