def _get_rnn_layer(mode, num_layers, input_size, hidden_size, dropout, weight_dropout):
if mode == '<STR_LIT>':<EOL><INDENT>rnn_block = functools.partial(rnn.RNN, activation='<STR_LIT:relu>')<EOL><DEDENT>elif mode == '<STR_LIT>':<EOL><INDENT>rnn_block = functools.partial(rnn.RNN, activation='<STR_LIT>')<EOL><DEDENT>elif mode == '<STR_LIT>':<EOL><INDENT>rnn_block = rnn.LSTM<EOL><DEDENT>elif mode == '<STR_LIT>':<EOL><INDENT>rnn_block = rnn.GRU<EOL><DEDENT>block = rnn_block(hidden_size, num_layers, dropout=dropout,<EOL>input_size=input_size)<EOL>if weight_dropout:<EOL><INDENT>apply_weight_drop(block, '<STR_LIT>', rate=weight_dropout)<EOL><DEDENT>return block<EOL>
create rnn layer given specs