code: def gaussian(t, fan_in=0, fan_out=0):
      """Initialize the values of the input tensor following a Gaussian
      distribution with specific std.
  
      Args:
          fan_in(int): for the weight Tensor of a convolution layer,
              fan_in = nb_channel * kh * kw; for dense layer,
              fan_in = input_feature_length
          fan_out(int): for the convolution layer weight Tensor,
              fan_out = nb_filter * kh * kw; for the weight Tensor of a dense
              layer, fan_out = output_feature_length
  
      Ref Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun: Delving Deep into
      Rectifiers: Surpassing Human-Level Performance on ImageNet Classification
      """
      assert (
          fan_in > 0 or fan_out > 0
      ), "fan_in and fan_out cannot be 0 at the same time"
      avg = 2
      if fan_in * fan_out == 0:
          avg = 1
      std = math.sqrt(2.0 * avg / (fan_in + fan_out))
      t.gaussian(0, std)
  
file_path: singa/python/singa/initializer.py
imports: from __future__ import division
  import math
  import numpy
  from deprecated import deprecated
label_desc: Use image node_id 9 for calling a global function with example usage: gaussian(t, fan_in, fan_out) without return types