docstr: export the channel dependencies as a csv file.
  The layers at the same line have output channel
  dependencies with each other. For example,
  layer1.1.conv2, conv1, and layer1.0.conv2 have
  output channel dependencies with each other, which
  means the output channel(filters) numbers of these
  three layers should be same with each other, otherwise
  the model may has shape conflict.
  
  Output example:
  Dependency Set,Convolutional Layers
  Set 1,layer1.1.conv2,layer1.0.conv2,conv1
  Set 2,layer1.0.conv1
  Set 3,layer1.1.conv1
docstr_tok: ["export","the","channel","dependencies","as","a","csv","file",".","The","layers","at","the","same","line","have","output","channel","dependencies","with","each","other",".","For","example",",","layer1.1.conv2",",","conv1",",","and","layer1.0.conv2","have","output","channel","dependencies","with","each","other",",","which","means","the","output","channel","(","filters",")","numbers","of","these","three","layers","should","be","same","with","each","other",",","otherwise","the","model","may","has","shape","conflict",".","Output","example",":","Dependency","Set",",","Convolutional","Layers","Set","1",",","layer1.1.conv2",",","layer1.0.conv2",",","conv1","Set","2",",","layer1.0.conv1","Set","3",",","layer1.1.conv1"]
code: def export(self, filepath):
      """
      export the channel dependencies as a csv file.
      The layers at the same line have output channel
      dependencies with each other. For example,
      layer1.1.conv2, conv1, and layer1.0.conv2 have
      output channel dependencies with each other, which
      means the output channel(filters) numbers of these
      three layers should be same with each other, otherwise
      the model may has shape conflict.
  
      Output example:
      Dependency Set,Convolutional Layers
      Set 1,layer1.1.conv2,layer1.0.conv2,conv1
      Set 2,layer1.0.conv1
      Set 3,layer1.1.conv1
      """
      header = ["Dependency Set", "Layers"]
      setid = 0
      visited = set()
      with open(filepath, "w") as csvf:
          csv_w = csv.writer(csvf, delimiter=",")
          csv_w.writerow(header)
          for node in self.graph.nodes_py.nodes_op:
              if node.op_type != "Conv2d" or node in visited:
                  continue
              setid += 1
              row = ["Set %d" % setid]
              if node.name not in self.dependency:
                  visited.add(node)
                  row.append(node.name)
              else:
                  for other in self.dependency[node.name]:
                      visited.add(self.graph.name_to_node[other])
                      row.append(other)
              csv_w.writerow(row)
  
imports: import csv
  import logging
label_desc: Use image node_id 4 for calling the ChannelDependency obj's underlying member method code with example usage: obj.export(filepath) without return types