class_docstr: Encoder for Masked Language Modelling.
class_docstr_tok: ["Encoder","for","Masked","Language","Modelling","."]
code: def upgrade_state_dict_named(self, state_dict, name):
      if not self.load_softmax:
          for k in list(state_dict.keys()):
              if (
                  "embed_out.weight" in k
                  or "sentence_projection_layer.weight" in k
                  or "lm_output_learned_bias" in k
              ):
                  del state_dict[k]
      return state_dict
  
imports: import logging
  import torch
  import torch.nn
  import torch.nn.functional
  from fairseq import utils
  from fairseq.models import FairseqEncoder, FairseqEncoderModel, register_model, register_model_architecture
  from fairseq.modules import LayerNorm, SinusoidalPositionalEmbedding, TransformerSentenceEncoder
  from fairseq.modules.transformer_sentence_encoder import init_bert_params
  from fairseq.utils import safe_hasattr
label_desc: Use image node_id 4 for calling the MaskedLMEncoder obj's underlying member method code with example usage: obj.upgrade_state_dict_named(state_dict, name) and returns: state_dict