The GRU equations are formulated as shown below, where e t is the real-valued hidden-state vector at time step t, v t is the corresponding sentence input vector and rev() is the reverse function.
for a document D with m sentences, the bidirectional document encoder's final hidden state, which is the document representation e, is given by, where e f m and e b m are the final hidden states of the forward and backward sentence-level GRU-RNNs respectively, [] represents vector concatenation.