class_docstr: The RNN-based encoder for ASR models.
  Followed the architecture suggested in the following paper:
  'STREAMING END-TO-END SPEECH RECOGNITION FOR MOBILE DEVICES' by Yanzhang He et al.
  https://arxiv.org/pdf/1811.06621.pdf
  
  
  Args:
      feat_in (int): the size of feature channels
      n_layers (int): number of layers of RNN
      d_model (int): the hidden size of the model
      proj_size (int): the size of the output projection after each RNN layer
      rnn_type (str): the type of the RNN layers, choices=['lstm, 'gru', 'rnn']
      bidirectional (float): specifies whether RNN layers should be bidirectional or not
          Defaults to True.
      feat_out (int): the size of the output features
          Defaults to -1 (means feat_out is d_model)
      subsampling (str): the method of subsampling, choices=['stacking, 'vggnet', 'striding']
          Defaults to stacking.
      subsampling_factor (int): the subsampling factor
          Defaults to 4.
      subsampling_conv_channels (int): the size of the convolutions in the subsampling module for vggnet and striding
          Defaults to -1 which would set it to d_model.
      dropout (float): the dropout rate used between all layers
          Defaults to 0.2.
class_docstr_tok: ["The","RNN-based","encoder","for","ASR","models",".","Followed","the","architecture","suggested","in","the","following","paper",":","'STREAMING","END-TO-END","SPEECH","RECOGNITION","FOR","MOBILE","DEVICES","'","by","Yanzhang","He","et","al",".","https",":","\/\/arxiv.org\/pdf\/1811.06621.pdf","Args",":","feat_in","(","int",")",":","the","size","of","feature","channels","n_layers","(","int",")",":","number","of","layers","of","RNN","d_model","(","int",")",":","the","hidden","size","of","the","model","proj_size","(","int",")",":","the","size","of","the","output","projection","after","each","RNN","layer","rnn_type","(","str",")",":","the","type","of","the","RNN","layers",",","choices=","[","'lstm",",","'gru","'",",","'rnn","'","]","bidirectional","(","float",")",":","specifies","whether","RNN","layers","should","be","bidirectional","or","not","Defaults","to","True",".","feat_out","(","int",")",":","the","size","of","the","output","features","Defaults","to","-1","(","means","feat_out","is","d_model",")","subsampling","(","str",")",":","the","method","of","subsampling",",","choices=","[","'stacking",",","'vggnet","'",",","'striding","'","]","Defaults","to","stacking",".","subsampling_factor","(","int",")",":","the","subsampling","factor","Defaults","to","4.","subsampling_conv_channels","(","int",")",":","the","size","of","the","convolutions","in","the","subsampling","module","for","vggnet","and","striding","Defaults","to","-1","which","would","set","it","to","d_model",".","dropout","(","float",")",":","the","dropout","rate","used","between","all","layers","Defaults","to","0.2","."]
code: def forward(self, audio_signal, length=None):
      max_audio_length: int = audio_signal.size(-1)
  
      if length is None:
          length = audio_signal.new_full(
              audio_signal.size(0),
              max_audio_length,
              dtype=torch.int32,
              device=self.seq_range.device,
          )
  
      audio_signal = torch.transpose(audio_signal, 1, 2)
  
      if isinstance(self.pre_encode, nn.Linear):
          audio_signal = self.pre_encode(audio_signal)
      else:
          audio_signal, length = self.pre_encode(audio_signal, length)
  
      for lth, layer in enumerate(self.layers):
          audio_signal = layer(audio_signal)
          if isinstance(audio_signal, tuple):
              audio_signal, _ = audio_signal
  
      audio_signal = torch.transpose(audio_signal, 1, 2)
      return audio_signal, length
  
file_path: NeMo/nemo/collections/asr/modules/rnn_encoder.py
imports: from collections import OrderedDict
  import torch
  import torch.distributed
  import torch.nn
  from nemo.collections.asr.parts.submodules.subsampling import ConvSubsampling, StackingSubsampling
  from nemo.core.classes.common import typecheck
  from nemo.core.classes.exportable import Exportable
  from nemo.core.classes.module import NeuralModule
  from nemo.core.neural_types import AcousticEncodedRepresentation, LengthsType, NeuralType, SpectrogramType
label_desc: Use image node_id 5 for calling the RNNEncoder obj's underlying member method code with example usage: obj.forward(audio_signal, length) and returns: audio_signal,  length