提交 0bf76bf5 authored 作者: Frederic Bastien's avatar Frederic Bastien

make pydotprint_variables interface more like pydotprint.

上级 c49edd05
...@@ -611,7 +611,8 @@ def pydotprint(fct, outfile=None, ...@@ -611,7 +611,8 @@ def pydotprint(fct, outfile=None,
def pydotprint_variables(vars, def pydotprint_variables(vars,
outfile=os.path.join(config.compiledir,'theano.pydotprint.png'), outfile=None,
format='png',
depth = -1, depth = -1,
high_contrast = True, colorCodes = None): high_contrast = True, colorCodes = None):
''' Identical to pydotprint just that it starts from a variable instead ''' Identical to pydotprint just that it starts from a variable instead
...@@ -619,7 +620,9 @@ def pydotprint_variables(vars, ...@@ -619,7 +620,9 @@ def pydotprint_variables(vars,
if colorCodes is None: if colorCodes is None:
colorCodes = default_colorCodes colorCodes = default_colorCodes
if outfile is None:
outfile = os.path.join(config.compiledir,'theano.pydotprint.' +
config.device + '.' + format)
try: try:
import pydot as pd import pydot as pd
except: except:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论