code: def init_params(net):
      '''Init layer parameters.'''
      for m in net.modules():
          if isinstance(m, nn.Conv2d):
              init.kaiming_normal(m.weight, mode='fan_out')
              if m.bias:
                  init.constant(m.bias, 0)
          elif isinstance(m, nn.BatchNorm2d):
              init.constant(m.weight, 1)
              init.constant(m.bias, 0)
          elif isinstance(m, nn.Linear):
              init.normal(m.weight, std=1e-3)
              if m.bias:
                  init.constant(m.bias, 0f init_params(net):
      '''Init layer parameters.'''
      for m in net.modules():
          if isinstance(m, nn.Conv2d):
              init.kaiming_normal(m.weight, mode='fan_out')
              if m.bias:
                  init.constant(m.bias, 0)
          elif isinstance(m, nn.BatchNorm2d):
              init.constant(m.weight, 1)
              init.constant(m.bias, 0)
          elif isinstance(m, nn.Linear):
              init.normal(m.weight, std=1e-3)
              if m.bias:
                  init.constant(m.bias, 0)
docs: Init layer parameters.