class_docstr: To use, you must extend this class and define single_model_cls as a class
  variable. Example:
  
      @register_model("semi_supervised_transformer")
      class SemiSupervisedTransformerModel(SemiSupervisedModel):
          # We can't use `self.single_model_cls` because at this point
          # `__init__` hasn't run. single_model_cls is a static class variable
          # that is meant to be constant.
          single_model_cls = TransformerModel
  
          @staticmethod
          def add_args(parser):
              TransformerModel.add_args(parser)
              SemiSupervisedModel.add_args(parser)
class_docstr_tok: ["To","use",",","you","must","extend","this","class","and","define","single_model_cls","as","a","class","variable",".","Example",":","@","register_model","(","``","semi_supervised_transformer","''",")","class","SemiSupervisedTransformerModel","(","SemiSupervisedModel",")",":","#","We","ca","n't","use","`","self.single_model_cls","`","because","at","this","point","#","`","__init__","`","has","n't","run",".","single_model_cls","is","a","static","class","variable","#","that","is","meant","to","be","constant",".","single_model_cls","=","TransformerModel","@","staticmethod","def","add_args","(","parser",")",":","TransformerModel.add_args","(","parser",")","SemiSupervisedModel.add_args","(","parser",")"]
docstr: Add model-specific arguments to the parser.
docstr_tok: ["Add","model-specific","arguments","to","the","parser","."]
code: def add_args(parser):
      """Add model-specific arguments to the parser."""
      parser.add_argument(
          "--share-encoder-embeddings",
          action="store_true",
          help="share encoder embeddings across languages",
      )
      parser.add_argument(
          "--share-decoder-embeddings",
          action="store_true",
          help="share decoder embeddings across languages",
      )
      parser.add_argument(
          "--share-encoders",
          action="store_true",
          help="share encoders across languages",
      )
      parser.add_argument(
          "--share-decoders",
          action="store_true",
          help="share decoders across languages",
      )
      parser.add_argument(
          "--remove-vr-if-same-lang-at-enc-and-dec",
          type=utils.bool_flag,
          nargs="?",
          const=True,
          default=True,
          help="Whether to remove vocab reduction in the decoder for src-src "
          "and tgt-tgt models. Note this should be True unless you use a "
          "joint vocab AND your lexical dictionaries are built to "
          "accommodate the same language at source and target.",
      )
  
file_path: translate/pytorch_translate/semi_supervised.py
imports: import copy
  from collections import OrderedDict
  import torch.nn
  from fairseq.models import FairseqMultiModel, register_model, register_model_architecture
  from pytorch_translate import common_layers, constants, utils
label_desc: Use image node_id 2 for calling the SemiSupervisedModel obj's underlying member method code with example usage: obj.add_args(parser) without return types