code: def unitary_init(
      in_features, out_features, kernel_size=None, criterion="glorot"
  ):
      """Returns a matrice of unitary complex numbers.
  
      Arguments
      ---------
      in_features : int
          Number of real values of the input layer (quaternion // 4).
      out_features : int
          Number of real values of the output layer (quaternion // 4).
      kernel_size : int
          Kernel_size for convolutional layers (ex: (3,3)).
      criterion : str
          (glorot, he) (default "glorot").
      """
  
      if kernel_size is None:
          kernel_shape = (in_features, out_features)
      else:
          if type(kernel_size) is int:
              kernel_shape = (out_features, in_features) + tuple(
                  (kernel_size,)
              )
          else:
              kernel_shape = (out_features, in_features) + (
                  *kernel_size,
              )
  
      number_of_weights = np.prod(kernel_shape)
      v_r = np.random.uniform(-1.0, 1.0, number_of_weights)
      v_i = np.random.uniform(-1.0, 1.0, number_of_weights)
  
      # Unitary complex
      for i in range(0, number_of_weights):
          norm = np.sqrt(v_r[i] ** 2 + v_i[i] ** 2) + 0.0001
          v_r[i] /= norm
          v_i[i] /= norm
  
      v_r = v_r.reshape(kernel_shape)
      v_i = v_i.reshape(kernel_shape)
  
      return (v_r, v_i)
  
file_path: speechbrain/speechbrain/nnet/complex_networks/c_ops.py
imports: import torch
  import torch.nn.functional
  import numpy
label_desc: Use image node_id 7 for calling a global function with example usage: unitary_init(in_features, out_features, kernel_size, criterion) and returns: v_r,  v_i