class_docstr: Initialize the Lightseq Embedding Layer.
  
  Static variable:
      layer_id: The layer-index counter starting from 0 and incrementing by 1 every time a layer object is instantiated,
  Arguments:
      config: An object of LSTransformerEmbeddingLayer config, see get_config
  
      initial_embeddings: Optional: Only used for unit test
class_docstr_tok: ["Initialize","the","Lightseq","Embedding","Layer",".","Static","variable",":","layer_id",":","The","layer-index","counter","starting","from","0","and","incrementing","by","1","every","time","a","layer","object","is","instantiated",",","Arguments",":","config",":","An","object","of","LSTransformerEmbeddingLayer","config",",","see","get_config","initial_embeddings",":","Optional",":","Only","used","for","unit","test"]
code: def __assign_layer_weight_grad(self):
      param = (
          self.para_16
          if self.config.fp16 and self.para.dtype != torch.half
          else self.para
      )
  
      if self.config.layer_id in _all_layer_grads:
          return
  
      cuda_module = transformer_cuda_module
      if self.config.fp16:
          func = cuda_module.assign_layer_weight_grad_fp16
      else:
          func = cuda_module.assign_layer_weight_grad_fp32
      grad = torch.zeros_like(param)
      func(
          param, grad, "TransformerEmbeddingLayer", self.config.layer_id
      )
      _all_layer_grads[self.config.layer_id] = grad
  
imports: import copy
  import torch
  from torch import nn
  from torch.autograd import Function
  from lightseq.training.ops.pytorch import TransformerBuilder
  from lightseq.training.ops.pytorch.layer_base import TransformerEmbeddingLayerBase
  from lightseq.training.ops.pytorch.util import copy_para, state_dict, calc_offset, get_pos_embedding
label_desc: Use image node_id 6 for calling the LSTransformerEmbeddingLayer obj's underlying member method code with example usage: obj.__assign_layer_weight_grad() without return types