code: def get_dropout_edit_option(dropout_schedule, data_fraction, iter_):
      """Return an option to be passed to nnet3-copy (or nnet3-am-copy)
      that will set the appropriate dropout proportion.  If no dropout
      is being used (dropout_schedule is None), returns the empty
      string, otherwise returns something like
      "--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.
          data_fraction: real number in [0,1] that says how far along
              in training we are.
          iter_: iteration number (needed for debug printing only)
      See ReadEditConfig() in nnet3/nnet-utils.h to see how
      set-dropout-proportion directive works.
      """
  
      if data_fraction > 1.0:
          data_fraction = 1.0
  
      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 "--edits='{0}'".format(";".join(edit_config_lines))
  
file_path: espnet/egs2/swbd/asr1/steps/libs/nnet3/train/dropout_schedule.py
imports: import logging
label_desc: Use image node_id 5 for calling a global function with example usage: get_dropout_edit_option(dropout_schedule, data_fraction, iter_) and returns: str, str