original_docstring: 
          Weight initialization as per Tensorflow official implementations.
          See: https://github.com/tensorflow/tensorflow/blob/v2.1.0/tensorflow/python/ops/init_ops.py
               #L437
          
docstring: Weight initialization as per Tensorflow official implementations.
docstring_tokens: Weight initialization as per Tensorflow official implementations .
code: def _init_weights(self):
          """
          Weight initialization as per Tensorflow official implementations.
          See: https://github.com/tensorflow/tensorflow/blob/v2.1.0/tensorflow/python/ops/init_ops.py
               #L437
          """
          for m in self.modules():
              if isinstance(m, nn.Conv2d):
                  fan_in = m.kernel_size[0] * m.kernel_size[1] * m.in_channels
                  stddev = math.sqrt(1. / max(1., fan_in))
                  m.weight.data.normal_(0, stddev)
                  if m.bias is not None:
                      m.bias.data.zero_()
              elif isinstance(m, nn.BatchNorm2d):
                  if self.bn_momentum is not None and self.bn_eps is not None:
                      m.momentum = self.bn_momentum
                      m.eps = self.bn_eps
                  m.weight.data.fill_(1)
                  m.bias.data.zero_()
  
          # Use prior in model initialization to improve stability
          bias_value = -math.log((1 - self.prior_prob) / self.prior_prob)
          torch.nn.init.constant_(self.cls_score.bias, bias_value)
code_tokens: def _init_weights ( self ) : for m in self . modules ( ) : if isinstance ( m , nn . Conv2d ) : fan_in = m . kernel_size [ 0 ] * m . kernel_size [ 1 ] * m . in_channels stddev = math . sqrt ( 1. / max ( 1. , fan_in ) ) m . weight . data . normal_ ( 0 , stddev ) if m . bias is not None : m . bias . data . zero_ ( ) elif isinstance ( m , nn . BatchNorm2d ) : if self . bn_momentum is not None and self . bn_eps is not None : m . momentum = self . bn_momentum m . eps = self . bn_eps m . weight . data . fill_ ( 1 ) m . bias . data . zero_ ( ) bias_value = - math . log ( ( 1 - self . prior_prob ) / self . prior_prob ) torch . nn . init . constant_ ( self . cls_score . bias , bias_value )
short_docstring: Weight initialization as per Tensorflow official implementations.
short_docstring_tokens: Weight initialization as per Tensorflow official implementations .
comment: """
          Weight initialization as per Tensorflow official implementations.
          See: https://github.com/tensorflow/tensorflow/blob/v2.1.0/tensorflow/python/ops/init_ops.py
               #L437
          """$SEP$# Use prior in model initialization to improve stability