提交 bfd4b949 authored 作者: Frederic Bastien's avatar Frederic Bastien

use the good extention for the default pydotprint filename and add the device in the name.

上级 6001e871
...@@ -373,7 +373,7 @@ pprint.assign(lambda pstate, r: hasattr(pstate, 'target') and pstate.target is n ...@@ -373,7 +373,7 @@ pprint.assign(lambda pstate, r: hasattr(pstate, 'target') and pstate.target is n
pp = pprint pp = pprint
def pydotprint(fct, outfile=os.path.join(config.compiledir,'theano.pydotprint.png'), def pydotprint(fct, outfile=None,
compact=True, mode=None, format='png', with_ids=False): compact=True, mode=None, format='png', with_ids=False):
""" """
print to a file in png format the graph of op of a compile theano fct. print to a file in png format the graph of op of a compile theano fct.
...@@ -397,6 +397,9 @@ def pydotprint(fct, outfile=os.path.join(config.compiledir,'theano.pydotprint.pn ...@@ -397,6 +397,9 @@ def pydotprint(fct, outfile=os.path.join(config.compiledir,'theano.pydotprint.pn
red ellipses are transfer to/from the gpu. red ellipses are transfer to/from the gpu.
op with those name GpuFromHost, HostFromGpu op with those name GpuFromHost, HostFromGpu
""" """
if outfile is None:
outfile = os.path.join(config.compiledir,'theano.pydotprint.' +
config.device + '.' + format)
if not isinstance(mode,ProfileMode) or not mode.fct_call.has_key(fct): if not isinstance(mode,ProfileMode) or not mode.fct_call.has_key(fct):
mode=None mode=None
try: try:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论