class_docstr: This function implements a vanilla complex-valued RNN.
  
  Input format is (batch, time, fea) or (batch, time, fea, channel).
  In the latter shape, the two last dimensions will be merged:
  (batch, time, fea * channel)
  
  Arguments
  ---------
  hidden_size : int
      Number of output neurons (i.e, the dimensionality of the output).
      Specified value is in term of complex-valued neurons. Thus, the output
      is 2*hidden_size.
  num_layers : int, optional
      Number of layers to employ in the RNN architecture (default 1).
  nonlinearity : str, optional
      Type of nonlinearity (tanh, relu) (default "tanh").
  bias : bool, optional
      If True, the additive bias b is adopted (default True).
  dropout : float, optional
      It is the dropout factor (must be between 0 and 1) (default 0.0).
  return_hidden : bool, optional
      It True, the function returns the last hidden layer (default False).
  bidirectional : bool, optional
      If True, a bidirectional model that scans the sequence both
      right-to-left and left-to-right is used (default False).
  init_criterion : str , optional
      (glorot, he).
      This parameter controls the initialization criterion of the weights.
      It is combined with weights_init to build the initialization method of
      the complex-valued weights (default "glorot").
  weight_init : str, optional
      (complex, unitary).
      This parameter defines the initialization procedure of the
      complex-valued weights (default "complex"). "complex" will generate random complex-valued
      weights following the init_criterion and the complex polar form.
      "unitary" will normalize the weights to lie on the unit circle.
      More details in: "Deep Complex Networks", Trabelsi C. et al.
  
  Example
  -------
  >>> inp_tensor = torch.rand([10, 16, 30])
  >>> rnn = CRNN(hidden_size=16, input_shape=inp_tensor.shape)
  >>> out_tensor = rnn(inp_tensor)
  >>>
  torch.Size([10, 16, 32])
class_docstr_tok: ["This","function","implements","a","vanilla","complex-valued","RNN",".","Input","format","is","(","batch",",","time",",","fea",")","or","(","batch",",","time",",","fea",",","channel",")",".","In","the","latter","shape",",","the","two","last","dimensions","will","be","merged",":","(","batch",",","time",",","fea","*","channel",")","Arguments","--","--","--","--","-","hidden_size",":","int","Number","of","output","neurons","(","i.e",",","the","dimensionality","of","the","output",")",".","Specified","value","is","in","term","of","complex-valued","neurons",".","Thus",",","the","output","is","2","*","hidden_size",".","num_layers",":","int",",","optional","Number","of","layers","to","employ","in","the","RNN","architecture","(","default","1",")",".","nonlinearity",":","str",",","optional","Type","of","nonlinearity","(","tanh",",","relu",")","(","default","``","tanh","''",")",".","bias",":","bool",",","optional","If","True",",","the","additive","bias","b","is","adopted","(","default","True",")",".","dropout",":","float",",","optional","It","is","the","dropout","factor","(","must","be","between","0","and","1",")","(","default","0.0",")",".","return_hidden",":","bool",",","optional","It","True",",","the","function","returns","the","last","hidden","layer","(","default","False",")",".","bidirectional",":","bool",",","optional","If","True",",","a","bidirectional","model","that","scans","the","sequence","both","right-to-left","and","left-to-right","is","used","(","default","False",")",".","init_criterion",":","str",",","optional","(","glorot",",","he",")",".","This","parameter","controls","the","initialization","criterion","of","the","weights",".","It","is","combined","with","weights_init","to","build","the","initialization","method","of","the","complex-valued","weights","(","default","``","glorot","''",")",".","weight_init",":","str",",","optional","(","complex",",","unitary",")",".","This","parameter","defines","the","initialization","procedure","of","the","complex-valued","weights","(","default","``","complex","''",")",".","``","complex","''","will","generate","random","complex-valued","weights","following","the","init_criterion","and","the","complex","polar","form",".","``","unitary","''","will","normalize","the","weights","to","lie","on","the","unit","circle",".","More","details","in",":","``","Deep","Complex","Networks","''",",","Trabelsi","C.","et","al",".","Example","--","--","--","-",">",">",">","inp_tensor","=","torch.rand","(","[","10",",","16",",","30","]",")",">",">",">","rnn","=","CRNN","(","hidden_size=16",",","input_shape=inp_tensor.shape",")",">",">",">","out_tensor","=","rnn","(","inp_tensor",")",">",">",">","torch.Size","(","[","10",",","16",",","32","]",")"]
docstr: Initializes the layers of the CRNN.
  
  Arguments
  ---------
  first_input : tensor
      A first input used for initializing the parameters.
docstr_tok: ["Initializes","the","layers","of","the","CRNN",".","Arguments","--","--","--","--","-","first_input",":","tensor","A","first","input","used","for","initializing","the","parameters","."]
code: def _init_layers(
      self,
  ):
      """
      Initializes the layers of the CRNN.
  
      Arguments
      ---------
      first_input : tensor
          A first input used for initializing the parameters.
      """
      rnn = torch.nn.ModuleList([])
      current_dim = self.fea_dim
  
      for i in range(self.num_layers):
          rnn_lay = CRNN_Layer(
              current_dim,
              self.hidden_size,
              self.num_layers,
              self.batch_size,
              dropout=self.dropout,
              nonlinearity=self.nonlinearity,
              bidirectional=self.bidirectional,
              init_criterion=self.init_criterion,
              weight_init=self.weight_init,
          )
  
          rnn.append(rnn_lay)
  
          if self.bidirectional:
              current_dim = self.hidden_size * 2
          else:
              current_dim = self.hidden_size
  
      return rnn
  
imports: import torch
  import logging
  from speechbrain.nnet.complex_networks.c_linear import CLinear
  from speechbrain.nnet.complex_networks.c_normalization import CBatchNorm, CLayerNorm
label_desc: Use image node_id 2 for calling the CRNN obj's underlying member method code with example usage: obj._init_layers() and returns: rnn