Simple example of CuDnnGRU based RNN implementation in Tensorflow
I am using the following code for standard GRU implementation: def BiRNN_deep_dynamic_FAST_FULL_autolength(x,batch_size,dropout,hidden_dim): seq_len=length_rnn(x) with tf.variable_scope('forward'): lstm_cell_fwd =tf.contrib.rnn.GRUCell(hidden_dim,kernel_initializer=tf.contrib.layers.xavier_initializer(),bias_initializer=tf.contrib.layers.xavier_initializer()) lstm_cell_fwd = tf.contrib.rnn.DropoutWrapper(lstm_cell_fwd, output_keep_prob=dropout) with tf.variable_scope('backward'): lstm_cell_back =tf.contrib.rnn.GRUCell(hidden_dim,kernel_initializer=tf.contrib.layers.xavier_initializer(),bias