class_docstr: A class for modifying a neural nework using many of the operations above. 
class_docstr_tok: ["A","class","for","modifying","a","neural","nework","using","many","of","the","operations","above","."]
docstr: Takes a neural network nn and applies the library of changes to it to produce
  a list of modifiers.
  num_steps_probs is a list of probabilities that indicate with what probability
  we want to use a certain number of steps.
docstr_tok: ["Takes","a","neural","network","nn","and","applies","the","library","of","changes","to","it","to","produce","a","list","of","modifiers",".","num_steps_probs","is","a","list","of","probabilities","that","indicate","with","what","probability","we","want","to","use","a","certain","number","of","steps","."]
code: def get_modifications_for_a_single_nn(
      self, nn, num_modifications, num_steps_probs, **kwargs
  ):
      """Takes a neural network nn and applies the library of changes to it to produce
      a list of modifiers.
      num_steps_probs is a list of probabilities that indicate with what probability
      we want to use a certain number of steps.
      """
      max_num_steps = len(num_steps_probs)
      num_step_choices = np.random.choice(
          list(range(max_num_steps)),
          num_modifications,
          replace=True,
          p=num_steps_probs,
      )
      num_modifs_per_step = [
          np.sum(num_step_choices == i) for i in range(max_num_steps)
      ]
      ret = []
      for num_step_val_minus1, num_modifs_this_step in enumerate(
          num_modifs_per_step
      ):
          if num_modifs_this_step == 0:
              continue
          new_nns = self.get_multi_step_modifications(
              nn,
              num_step_val_minus1 + 1,
              num_modifs_this_step,
              **kwargs,
          )
          ret.extend(new_nns)
      return ret
  
imports: from argparse import Namespace
  from copy import deepcopy
  import numpy
  from .neural_network import ConvNeuralNetwork, MultiLayerPerceptron, MLP_RECTIFIERS, MLP_SIGMOIDS, is_a_pooling_layer_label, is_a_conv_layer_label, CNNImageSizeMismatchException, CNNNoConvAfterIPException
  from ..utils.general_utils import reorder_list_or_array, reorder_rows_and_cols_in_matrix
  from ..utils.option_handler import get_option_specs, load_options
  from ..utils.reporters import get_reporter
label_desc: Use image node_id 3 for calling the NNModifier obj's underlying member method code with example usage: obj.get_modifications_for_a_single_nn(nn, num_modifications, num_steps_probs) and returns: ret