class_docstr: This is a typical mlm model whose size is usually the 1/4 - 1/2 of the discriminator.
class_docstr_tok: ["This","is","a","typical","mlm","model","whose","size","is","usually","the","1\/4","-","1\/2","of","the","discriminator","."]
docstr: Tie the embedding layers between the backbone and the MLM decoder
  
  Parameters
  ----------
  word_embed_params
  token_type_embed_params
  token_pos_embed_params
  embed_layer_norm_params
docstr_tok: ["Tie","the","embedding","layers","between","the","backbone","and","the","MLM","decoder","Parameters","--","--","--","--","--","word_embed_params","token_type_embed_params","token_pos_embed_params","embed_layer_norm_params"]
code: def tie_embeddings(
      self,
      word_embed_params=None,
      token_type_embed_params=None,
      token_pos_embed_params=None,
      embed_layer_norm_params=None,
  ):
      """Tie the embedding layers between the backbone and the MLM decoder
  
      Parameters
      ----------
      word_embed_params
      token_type_embed_params
      token_pos_embed_params
      embed_layer_norm_params
  
      """
      self.backbone_model.word_embed.share_parameters(word_embed_params)
      self.mlm_decoder[-1].share_parameters(word_embed_params)
      self.backbone_model.token_type_embed.share_parameters(
          token_type_embed_params
      )
      self.backbone_model.token_pos_embed.share_parameters(
          token_pos_embed_params
      )
      self.backbone_model.embed_layer_norm.share_parameters(
          embed_layer_norm_params
      )
  
imports: import os
  from typing import Tuple, Optional, List
  import mxnet
  from mxnet import use_np, np, npx
  from mxnet.gluon import HybridBlock, nn
  from .base import BACKBONE_REGISTRY
  from .transformer import TransformerEncoderLayer
  from ..op import gumbel_softmax, select_vectors_by_position, add_vectors_by_position, update_vectors_by_position
  from ..base import get_model_zoo_home_dir, get_repo_model_zoo_url, get_model_zoo_checksum_dir
  from ..layers import PositionalEmbedding, get_activation
  from ..initializer import TruncNorm
  from ..utils.config import CfgNode
  from ..utils.misc import load_checksum_stats, download
  from ..utils.registry import Registry
  from ..attention_cell import gen_self_attn_mask
  from ..data.tokenizers import HuggingFaceWordPieceTokenizer
label_desc: Use image node_id 2 for calling the ElectraGenerator obj's underlying member method code with example usage: obj.tie_embeddings(word_embed_params, token_type_embed_params, token_pos_embed_params, embed_layer_norm_params) without return types