class_docstr: Head selection implemented in S2TTransformer
class_docstr_tok: ["Head","selection","implemented","in","S2TTransformer"]
code: def add_args(parser):
      S2TTransformerModel.add_args(parser)
      # encoder head selection
      parser.add_argument(
          "--encoder-attn-head-select",
          action="store_true",
          default=False,
          help="encoder head selection",
      )
      parser.add_argument(
          "--total-encoder-attention-heads",
          type=int,
          help="total number of encoder attention heads",
      )
      # decoder self attention selection
      parser.add_argument(
          "--decoder-self-attn-head-select",
          action="store_true",
          default=False,
          help="decoder self-attention head selection",
      )
      # decoder-encoder attention selection
      parser.add_argument(
          "--dec-enc-attn-head-select",
          action="store_true",
          default=False,
          help="decoder-encoder attention head selection",
      )
      parser.add_argument(
          "--total-decoder-attention-heads",
          type=int,
          help="total number of decoder attention heads",
      )
      # selection strategy
      parser.add_argument(
          "--attn-head-select-strategy",
          type=str,
          help="attention head selection strategy, subset or group",
      )
  
imports: import logging
  from typing import Dict, List, Optional
  from pathlib import Path
  import torch.nn
  from torch import Tensor
  from fairseq import checkpoint_utils
  from fairseq.models import register_model, register_model_architecture
  from fairseq.utils import safe_hasattr
  from fairseq.models.speech_to_text.s2t_transformer import S2TTransformerModel, S2TTransformerEncoder, TransformerDecoderScriptable
  from fairseq.models.speech_to_text.s2t_transformer import base_architecture
  from ..modules.attn_head_selector import AttnHeadSelector
  from ..modules.head_selection_transformer_layer import HeadSelectionTransformerEncoderLayer
  from .head_selection_transformer import HeadSelectionTransformerDecoder
label_desc: Use image node_id 2 for calling the HeadSelectionS2TTransformerModel obj's underlying member method code with example usage: obj.add_args(parser) without return types