parameters: (var, gain=1.0)
return_statement: return var.assign(xavier_gauss(tuple(var.shape), var.dtype, gain))
docstring: Inplace initialize Jittor Var by xavier_gauss, a.k.a xavier_normal.
      The resulting var will have values sampled from
      :math:`gauss(-a, a)` where
  
      .. math::
          \text{std} = \text{gain} \times \sqrt{\frac{2}{\text{fan\_in} + \text{fan\_out}}}
  
      Args:
          var (Jittor Var):
              Var to be initialized by random xavier_gauss
          gain (float):
              an optional scaling factor.
  
      Example::
  
          from jittor import init
          from jittor import nn
          linear = nn.Linear(2,2)
          init.xavier_gauss_(linear.weight, init.calculate_gain('relu'))
          print(linear.weight)
          linear.weight.xavier_gauss_() # This is ok too
docstring_summary: Inplace initialize Jittor Var by xavier_gauss, a.k.a xavier_normal.
      The resulting var will have values sampled from
      :math:`gauss(-a, a)` where
docstring_tokens: Inplace initialize Jittor Var by xavier_gauss a . k . a xavier_normal . The resulting var will have values sampled from : math : gauss ( - a a ) where
function: def xavier_gauss_(var, gain=1.0):
      ''' Inplace initialize Jittor Var by xavier_gauss, a.k.a xavier_normal.
      The resulting var will have values sampled from
      :math:`gauss(-a, a)` where
  
      .. math::
          \text{std} = \text{gain} \times \sqrt{\frac{2}{\text{fan\_in} + \text{fan\_out}}}
  
      Args:
          var (Jittor Var):
              Var to be initialized by random xavier_gauss
          gain (float):
              an optional scaling factor.
  
      Example::
  
          from jittor import init
          from jittor import nn
          linear = nn.Linear(2,2)
          init.xavier_gauss_(linear.weight, init.calculate_gain('relu'))
          print(linear.weight)
          linear.weight.xavier_gauss_() # This is ok too
  
      '''
      return var.assign(xavier_gauss(tuple(var.shape), var.dtype, gain))
function_tokens: def xavier_gauss_ ( var , gain = 1.0 ) : return var . assign ( xavier_gauss ( tuple ( var . shape ) , var . dtype , gain ) )