class_docstr: Model specification given adjacency matrix and labeling.
class_docstr_tok: ["Model","specification","given","adjacency","matrix","and","labeling","."]
docstr: Creates a dot graph. Can be visualized in colab directly.
docstr_tok: ["Creates","a","dot","graph",".","Can","be","visualized","in","colab","directly","."]
code: def visualize(self):
      """Creates a dot graph. Can be visualized in colab directly."""
      num_vertices = np.shape(self.matrix)[0]
      g = graphviz.Digraph()
      g.node(str(0), "input")
      for v in range(1, num_vertices - 1):
          g.node(str(v), self.ops[v])
      g.node(str(num_vertices - 1), "output")
  
      for src in range(num_vertices - 1):
          for dst in range(src + 1, num_vertices):
              if self.matrix[src, dst]:
                  g.edge(str(src), str(dst))
  
      return g
  
file_path: singa/examples/model_selection/TRAILS-Database-Native-Model-Selection/internal/ml/model_selection/src/third_pkg/sp101_lib/model_spec.py
imports: import copy
  import hashlib
  import itertools
  import numpy
label_desc: Use image node_id 4 for calling the NASBench101ModelSpec obj's underlying member method code with example usage: obj.visualize() and returns: g