# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 2
#     language: python
#     name: python2
# ---

# # Visualization

import subprocess

modelName="yolo2"

# +
# subprocess.call?
# -

subprocess.call("python net_drawer.py --input onnx/{}.onnx --output dot/{}.dot --embed_docstring".format(modelName,modelName), shell=True)

subprocess.call("dot -Tsvg dot/{}.dot -o svg/{}.svg".format(modelName,modelName), shell=True)

# # back up

# ! mkdir dot svg

# ! python net_drawer.py --input "onnx/squeezenet.onnx" --output "dot/squeezenet.dot" --embed_docstring --marked 1 --marked_list 2_3_4

# ! dot -Tsvg "dot/squeezenet.dot" -o "svg/squeezenet.svg"

# ! python net_drawer.py --input "onnx/squeezenet.onnx" --output "dot/squeezenet.dot" --embed_docstring 

# ! dot -Tsvg "dot/squeezenet.dot" -o "svg/squeezenet.svg"

# open .svg with Web

# ! python net_drawer.py --input "onnx/vgg19.onnx" --output "dot/vgg19.dot" --embed_docstring
# ! dot -Tsvg "dot/vgg19.dot" -o "svg/vgg19.svg"



StarcoderdataJupyterScriptsDedupFiltered