class_docstr: This function implements complex-valued LSTM layer.
  
  Arguments
  ---------
  input_size : int
      Feature dimensionality of the input tensors (in term of real values).
  batch_size : int
      Batch size of the input tensors.
  hidden_size : int
      Number of output values (in term of real values).
  num_layers : int, optional
      Number of layers to employ in the RNN architecture (default 1).
  dropout : float, optional
      It is the dropout factor (must be between 0 and 1) (default 0.0).
  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.
class_docstr_tok: ["This","function","implements","complex-valued","LSTM","layer",".","Arguments","--","--","--","--","-","input_size",":","int","Feature","dimensionality","of","the","input","tensors","(","in","term","of","real","values",")",".","batch_size",":","int","Batch","size","of","the","input","tensors",".","hidden_size",":","int","Number","of","output","values","(","in","term","of","real","values",")",".","num_layers",":","int",",","optional","Number","of","layers","to","employ","in","the","RNN","architecture","(","default","1",")",".","dropout",":","float",",","optional","It","is","the","dropout","factor","(","must","be","between","0","and","1",")","(","default","0.0",")",".","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","."]
docstr: This function changes the batch size when it is different from
  the one detected in the initialization method. This might happen in
  the case of multi-gpu or when we have different batch sizes in train
  and test. We also update the h_int and drop masks.
docstr_tok: ["This","function","changes","the","batch","size","when","it","is","different","from","the","one","detected","in","the","initialization","method",".","This","might","happen","in","the","case","of","multi-gpu","or","when","we","have","different","batch","sizes","in","train","and","test",".","We","also","update","the","h_int","and","drop","masks","."]
code: def _change_batch_size(self, x):
      """This function changes the batch size when it is different from
      the one detected in the initialization method. This might happen in
      the case of multi-gpu or when we have different batch sizes in train
      and test. We also update the h_int and drop masks.
      """
  
      if self.batch_size != x.shape[0]:
          self.batch_size = x.shape[0]
  
          if self.training:
              self.drop_masks = self.drop(
                  torch.ones(self.N_drop_masks, self.hidden_size * 2)
              ).data
  
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 6 for calling the CLSTM_Layer obj's underlying member method code with example usage: obj._change_batch_size(x) without return types