提交 2f8b838e authored 作者: Benjamin Scellier's avatar Benjamin Scellier

file theano/compile/profiling.py

上级 c0243f4c
...@@ -27,7 +27,7 @@ import sys ...@@ -27,7 +27,7 @@ import sys
import time import time
from collections import defaultdict from collections import defaultdict
import numpy import numpy as np
import theano import theano
from six import iteritems from six import iteritems
...@@ -440,7 +440,7 @@ class ProfileStats(object): ...@@ -440,7 +440,7 @@ class ProfileStats(object):
hs += ['<#apply>'] hs += ['<#apply>']
es += [' %4d '] es += [' %4d ']
upto_length = numpy.sum([len(x) for x in hs]) + len(hs) upto_length = np.sum([len(x) for x in hs]) + len(hs)
maxlen = max(self.line_width - upto_length, 0) maxlen = max(self.line_width - upto_length, 0)
hs += ['<Class name>'] hs += ['<Class name>']
es += ['%s'] es += ['%s']
...@@ -522,7 +522,7 @@ class ProfileStats(object): ...@@ -522,7 +522,7 @@ class ProfileStats(object):
hs += ['<#apply>'] hs += ['<#apply>']
es += [' %4d '] es += [' %4d ']
upto_length = numpy.sum([len(x) for x in hs]) + len(hs) upto_length = np.sum([len(x) for x in hs]) + len(hs)
maxlen = max(self.line_width - upto_length, 0) maxlen = max(self.line_width - upto_length, 0)
hs += ['<Op name>'] hs += ['<Op name>']
es += ['%s'] es += ['%s']
...@@ -590,7 +590,7 @@ class ProfileStats(object): ...@@ -590,7 +590,7 @@ class ProfileStats(object):
if self.variable_shape: if self.variable_shape:
hs += ['<Mflops>', '<Gflops/s>'] hs += ['<Mflops>', '<Gflops/s>']
upto_length = numpy.sum([len(x) for x in hs]) + len(hs) upto_length = np.sum([len(x) for x in hs]) + len(hs)
maxlen = max(self.line_width - upto_length, 0) maxlen = max(self.line_width - upto_length, 0)
hs += ['<Apply name>'] hs += ['<Apply name>']
es += ['%s'] es += ['%s']
...@@ -892,7 +892,7 @@ class ProfileStats(object): ...@@ -892,7 +892,7 @@ class ProfileStats(object):
node_list = list(node_list) node_list = list(node_list)
mem_count = 0 mem_count = 0
max_mem_count = 0 max_mem_count = 0
mem_bound = numpy.inf mem_bound = np.inf
# This take only the inputs/outputs dependencies. # This take only the inputs/outputs dependencies.
dependencies = fgraph.profile.dependencies dependencies = fgraph.profile.dependencies
done_set = set([]) done_set = set([])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论