class_docstr: Initialize the Lightseq Transformer Encoder Layer.
  
  Static variable:
      layer_id: The layer-index counter starting from 0 and incrementing by 1 every time a layer object is instantiated,
      e.g. if a model has 24 transformer layers, layer_id goes from 0 to 23.
  Arguments:
      config: An object of LSTransformerEncoderLayer config, see get_config
  
      initial_weights: Optional: Only used for unit test
  
      initial_biases: Optional: Only used for unit test
class_docstr_tok: ["Initialize","the","Lightseq","Transformer","Encoder","Layer",".","Static","variable",":","layer_id",":","The","layer-index","counter","starting","from","0","and","incrementing","by","1","every","time","a","layer","object","is","instantiated",",","e.g",".","if","a","model","has","24","transformer","layers",",","layer_id","goes","from","0","to","23",".","Arguments",":","config",":","An","object","of","LSTransformerEncoderLayer","config",",","see","get_config","initial_weights",":","Optional",":","Only","used","for","unit","test","initial_biases",":","Optional",":","Only","used","for","unit","test"]
code: def init_transformer_weights(self):
      hs = self.config.hidden_size
      ims = self.config.intermediate_size
      attn_qkvw = self._get_weights(0).view(-1, hs)
      nn.init.xavier_uniform_(attn_qkvw, 1.0 / math.sqrt(2.0))
      bound = self.calc_bound(attn_qkvw)
      nn.init.uniform_(self._get_weights(1), -bound, bound)
  
      nn.init.xavier_uniform_(self._get_weights(2).view(-1, hs), 1.0)
      nn.init.zeros_(self._get_weights(3))
  
      nn.init.ones_(self._get_weights(4))
      nn.init.zeros_(self._get_weights(5))
  
      inter_w = self._get_weights(6).view(ims, hs)
      nn.init.kaiming_uniform_(inter_w, math.sqrt(5.0))
      bound = self.calc_bound(inter_w)
      nn.init.uniform_(self._get_weights(7), -bound, bound)
  
      output_w = self._get_weights(8).view(hs, ims)
      nn.init.kaiming_uniform_(output_w, math.sqrt(5.0))
      bound = self.calc_bound(output_w)
      nn.init.uniform_(self._get_weights(9), -bound, bound)
  
      nn.init.ones_(self._get_weights(10))
      nn.init.zeros_(self._get_weights(11))
  
      act_cmax = act_quant_config.amax.tolist()
      wei_cmax = weight_quant_config.amax.tolist()
      init_clip_max = torch.tensor([act_cmax, wei_cmax, act_cmax] * 4)
      self._get_weights(12).copy_(init_clip_max)
  
imports: from itertools import zip_longest
  import math
  import copy
  import torch
  from torch import nn
  from torch.autograd import Function
  from lightseq.training.ops.pytorch.layer_base import TransformerEncoderLayerBase
  from lightseq.training.ops.pytorch.builder import TransformerBuilder
  from lightseq.training.ops.pytorch.quantization import weight_quant_config, act_quant_config, relu_quant_config
  from lightseq.training.ops.pytorch.util import copy_para, state_dict, calc_offset
label_desc: Use image node_id 6 for calling the LSTransformerEncoderLayer obj's underlying member method code with example usage: obj.init_transformer_weights() without return types