code: def get_dropout_edit_string(dropout_schedule, data_fraction, iter_):
      """Return an nnet3-copy --edits line to modify raw_model_string to
      set dropout proportions according to dropout_proportions.
      E.g. if _dropout_proportions(dropout_schedule, data_fraction)
      returns [('*', 0.625)],  this will return the string:
       "nnet3-copy --edits='set-dropout-proportion name=* proportion=0.625'"
  
  
      Arguments:
          dropout_schedule: Value for the --trainer.dropout-schedule option.
              See help for --trainer.dropout-schedule.
              See _self_test() for examples.
  
      See ReadEditConfig() in nnet3/nnet-utils.h to see how
      set-dropout-proportion directive works.
      """
  
      if dropout_schedule is None:
          return ""
  
      dropout_proportions = _get_dropout_proportions(
          dropout_schedule, data_fraction
      )
  
      edit_config_lines = []
      dropout_info = []
  
      for component_name, dropout_proportion in dropout_proportions:
          edit_config_lines.append(
              "set-dropout-proportion name={0} proportion={1}".format(
                  component_name, dropout_proportion
              )
          )
          dropout_info.append(
              "pattern/dropout-proportion={0}/{1}".format(
                  component_name, dropout_proportion
              )
          )
  
      if _debug_dropout:
          logger.info(
              "On iteration %d, %s", iter_, ", ".join(dropout_info)
          )
      return """nnet3-copy --edits='{edits}' - - |""".format(
          edits=";".join(edit_config_lines)
      )
  
file_path: espnet/egs2/tedlium2/asr1/steps/libs/nnet3/train/dropout_schedule.py
imports: import logging
label_desc: Use image node_id 6 for calling a global function with example usage: get_dropout_edit_string(dropout_schedule, data_fraction, iter_) and returns: str, str