# How is RNN decoder output calculated?

I was trying to read RNN Encoder Decoder paper.

### RNN (plain RNN i.e. non encoder-decoder RNN)

It starts with giving equation for RNN:

### RNN encoder-decoder

Then it explains RNN encoder-decoder:

What I am not able to get is how y_t is calculated in decoder? Is it by using softmax as in equation(2). If yes exactly how? Note that diagram shows three inputs for calculating y_t: h_t, c and y_(t-1). How these inputs are incorporated for calculating y. The paper does not seem to discuss this, or am I misreading?

Update

I just found that paper says: for an activation function g which must produce valid probabilities, e.g. a softmax. But still its unclear how exactly these three (h_t, y_(t-1) and c) variables can be included in softmax.

The paper's Appendix A has the exact formulas used. Specifically A.1 contains the exact formula for calculating $$\mathbf{c}$$, and A.1.1 contains details on where and how it is used.
• I guess $g$ refers to single row of $G$, a standard practice: refer individual row / column with small letters and whole matrix with capital letters. Apr 18 at 8:44
• Right, that would make $g_j$ the $K \times 1$ embedding vector for the $j$th output type, which makes sense in the context. Apr 19 at 5:24