class_docstr: A generic recurrent neural network encoder.
  
  Args:
     rnn_type (str):
        style of recurrent unit to use, one of [RNN, LSTM, GRU, SRU]
     bidirectional (bool) : use a bidirectional RNN
     num_layers (int) : number of stacked layers
     hidden_size (int) : hidden size of each layer
     dropout (float) : dropout value for :class:`torch.nn.Dropout`
     embeddings (onmt.modules.Embeddings): embedding module to use
class_docstr_tok: ["A","generic","recurrent","neural","network","encoder",".","Args",":","rnn_type","(","str",")",":","style","of","recurrent","unit","to","use",",","one","of","[","RNN",",","LSTM",",","GRU",",","SRU","]","bidirectional","(","bool",")",":","use","a","bidirectional","RNN","num_layers","(","int",")",":","number","of","stacked","layers","hidden_size","(","int",")",":","hidden","size","of","each","layer","dropout","(","float",")",":","dropout","value","for",":","class",":","`","torch.nn.Dropout","`","embeddings","(","onmt.modules.Embeddings",")",":","embedding","module","to","use"]
code: def update_dropout(self, dropout, attention_dropout=None):
      self.rnn.dropout = dropout
  
file_path: OpenNMT-py/onmt/encoders/rnn_encoder.py
imports: import torch.nn
  import torch.nn.functional
  from torch.nn.utils.rnn import pack_padded_sequence
  from torch.nn.utils.rnn import pad_packed_sequence
  from onmt.encoders.encoder import EncoderBase
  from onmt.utils.rnn_factory import rnn_factory
label_desc: Use image node_id 6 for calling the RNNEncoder obj's underlying member method code with example usage: obj.update_dropout(dropout, attention_dropout) without return types