class_docstr: Conveniently edit the parameters of a lucid model.
  
  Example usage:
  
    model = models.InceptionV1()
    param = ParameterEditor(model.graph_def)
    # Flip weights of first channel of conv2d0
    param["conv2d0_w", :, :, :, 0] *= -1
class_docstr_tok: ["Conveniently","edit","the","parameters","of","a","lucid","model",".","Example","usage",":","model","=","models.InceptionV1","(",")","param","=","ParameterEditor","(","model.graph_def",")","#","Flip","weights","of","first","channel","of","conv2d0","param","[","``","conv2d0_w","''",",",":",",",":",",",":",",","0","]","*","=","-1"]
code: def __init__(self, graph_def):
      self.nodes = {}
      for node in graph_def.node:
          if "value" in node.attr:
              self.nodes[str(node.name)] = node
      # Set a flag to mark the fact that this is an edited model
      if not "lucid_is_edited" in self.nodes:
          with tf.Graph().as_default() as temp_graph:
              const = tf.constant(True, name="lucid_is_edited")
              const_node = temp_graph.as_graph_def().node[0]
              graph_def.node.extend([const_node])
  
imports: import numpy
  import tensorflow
label_desc: Use image node_id 1 to create a new ParameterEditor object  with example: obj = ParameterEditor(graph_def)