code: import torch
  from torch.autograd import Function
  from torch import nn
  import torch.nn.functional as F
  
  def op_copy(optimizer):
      for param_group in optimizer.param_groups:
          param_group['lr0'] = param_group['lr']
      return optimizer
  
  def lr_scheduler(optimizer, iter_num, max_iter, gamma=10, power=0.75):
      decay = (1 + gamma * iter_num / max_iter) ** (-power)
      for param_group in optimizer.param_groups:
          param_group['lr'] = param_group['lr0'] * decay
          param_group['weight_decay'] = 1e-3
          param_group['momentum'] = 0.9
          param_group['nesterov'] = True
      return optimizer
      
  
  def init_weights(m):
      classname = m.__class__.__name__
      if classname.find('Conv2d') != -1 or classname.find('ConvTranspose2d') != -1:
          nn.init.kaiming_uniform_(m.weight)
          nn.init.zeros_(m.bias)
      elif classname.find('BatchNorm') != -1:
          nn.init.normal_(m.weight, 1.0, 0.02)
          nn.init.zeros_(m.bias)
      elif classname.find('Linear') != -1:
          nn.init.xavier_normal_(m.weight)
          nn.init.zeros_(m.bias)
  
  
  class KanNet(nn.Module):
      def __init__(self, output=1, bottleneck_dim=256, type="linear"):
          super(KanNet, self).__init__()
          self.type = type
          if type == 'wn':
              self.fc = weightNorm(nn.Linear(bottleneck_dim, output), name="weight")
              self.fc.apply(init_weights)
          else:
              self.fc = nn.Linear(bottleneck_dim, output)
              self.fc.apply(init_weights)
  
      def forward(self, x):
          x = self.fc(x)
          return x
  
      def get_weight(self):
          return self.fc.weight
  
      def get_bias(self):
          return self.fc.bias
apis: torch.nn.Linear torch.nn.init.xavier_normal_ torch.nn.init.normal_ torch.nn.init.zeros_ torch.nn.init.kaiming_uniform_