code: def affect_conv_init(
      r_weight,
      i_weight,
      j_weight,
      k_weight,
      kernel_size,
      init_func,
      init_criterion,
  ):
      """Applies the weight initialization function given to the parameters.
      This is specifically written for convolutional layers.
  
      Arguments
      ---------
      r_weight : torch.Parameters
          (nb_quaternion_in, nb_quaternion_out)
      i_weight : torch.Parameters
          (nb_quaternion_in, nb_quaternion_out)
      j_weight : torch.Parameters
          (nb_quaternion_in, nb_quaternion_out)
      k_weight : torch.Parameters
          (nb_quaternion_in, nb_quaternion_out)
      kernel_size : int
          Kernel size.
      init_func : function
          (unitary_init, quaternion_init)
      init_criterion : str
          (glorot, he)
      """
      in_channels = r_weight.size(1)
      out_channels = r_weight.size(0)
      r, i, j, k = init_func(
          in_channels,
          out_channels,
          kernel_size=kernel_size,
          criterion=init_criterion,
      )
      r_weight.data = r.type_as(r_weight.data)
      i_weight.data = i.type_as(i_weight.data)
      j_weight.data = j.type_as(j_weight.data)
      k_weight.data = k.type_as(k_weight.data)
  
file_path: speechbrain/speechbrain/nnet/quaternion_networks/q_ops.py
imports: import torch
  import math
  import numpy
  import torch.nn.functional
  from scipy.stats import chi
  from torch.autograd import Variable
label_desc: Use image node_id 8 for calling a global function with example usage: affect_conv_init(r_weight, i_weight, j_weight, k_weight, kernel_size, init_func, init_criterion) without return types