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

print the constant on the gpu too.

上级 af03d648
...@@ -4,6 +4,8 @@ They all allow different way to print a graph or the result of an Op in a graph( ...@@ -4,6 +4,8 @@ They all allow different way to print a graph or the result of an Op in a graph(
import sys, os, StringIO import sys, os, StringIO
from copy import copy from copy import copy
import numpy
import theano import theano
import gof import gof
from theano import config from theano import config
...@@ -486,7 +488,7 @@ def pydotprint(fct, outfile=None, ...@@ -486,7 +488,7 @@ def pydotprint(fct, outfile=None,
if var.name is not None: if var.name is not None:
varstr = 'name='+var.name+" "+str(var.type) varstr = 'name='+var.name+" "+str(var.type)
elif isinstance(var,gof.Constant): elif isinstance(var,gof.Constant):
dstr = 'val='+str(var.data) dstr = 'val='+str(numpy.asarray(var.data))
if '\n' in dstr: if '\n' in dstr:
dstr = dstr[:dstr.index('\n')] dstr = dstr[:dstr.index('\n')]
if len(dstr) > 30: if len(dstr) > 30:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论