class_docstr: bidirectionalRNN
class_docstr_tok: ["bidirectionalRNN"]
docstr: forward()
docstr_tok: ["forward","(",")"]
code: def forward(self, input, collect_hidden=False):
      """
      forward()
      """
      seq_len = input.size(0)
      bsz = input.size(1)
  
      fwd_out, fwd_hiddens = list(
          self.fwd(input, collect_hidden=collect_hidden)
      )
      bckwrd_out, bckwrd_hiddens = list(
          self.bckwrd(
              input, reverse=True, collect_hidden=collect_hidden
          )
      )
  
      output = torch.cat([fwd_out, bckwrd_out], -1)
      hiddens = tuple(
          torch.cat(hidden, -1)
          for hidden in zip(fwd_hiddens, bckwrd_hiddens)
      )
  
      return output, hiddens
  
imports: import torch
  import torch.nn
  from torch.autograd import Variable
  import torch.nn.functional
  import math
label_desc: Use image node_id 2 for calling the bidirectionalRNN obj's underlying member method code with example usage: obj.forward(input, collect_hidden) and returns: output,  hiddens