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: Returns the number of modifications depending on the passed value. 
docstr_tok: ["Returns","the","number","of","modifications","depending","on","the","passed","value","."]
code: def _get_num_modifications(
      cls, list_of_opers, passed_num_modifs, dflt_num_modifs
  ):
      """Returns the number of modifications depending on the passed value."""
      if passed_num_modifs == "all":
          return len(list_of_opers)
      elif passed_num_modifs is None:
          return dflt_num_modifs
      elif passed_num_modifs >= 0:
          return passed_num_modifs
      else:
          raise ValueError(
              "num_*_step_modifications should be 'all', "
              + "None or a positive integer. "
          )
  
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 4 for calling the NNModifier obj's underlying member method code with example usage: obj._get_num_modifications(cls, list_of_opers, passed_num_modifs, dflt_num_modifs) and returns: len, dflt_num_modifs, passed_num_modifs