    def add_args(parser):
        """Add task-specific arguments to the parser."""
        # fmt: off
        MultilingualTranslationTask.add_args(parser)
        parser.add_argument('--encoder-latent-layer', action='store_true', help='latent layer selection in encoder')
        parser.add_argument('--decoder-latent-layer', action='store_true', help='latent layer selection in decoder')
        parser.add_argument('--target-layers', default=-1, type=int,
                            help='number of effective layers to learn; -1 means no constraint')
        parser.add_argument('--sparsity-weight', default=0.0, type=float,
                            help='weight for sparsity loss')
        parser.add_argument('--share-weight', default=0.0, type=float,
                            help='weight for sharing loss')
        parser.add_argument('--soft-update', default=1, type=int,
                            help='number of updates with soft sampling')
        parser.add_argument('--anneal-updates', default=1, type=int,
                            help='number of updates to anneal the KL loss weight')
        parser.add_argument('--prior', default="uniform", type=str,
                            help='prior used for computing KL loss')
Add task-specific arguments to the parser.
examples/latent_depth/latent_depth_src/multilingual_translation_latent_depth.py