提交 e473c6c3 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Fixed a few typos

上级 7f862fdc
...@@ -53,7 +53,7 @@ def filter_compiledir(path): ...@@ -53,7 +53,7 @@ def filter_compiledir(path):
# the same directory at the same time. # the same directory at the same time.
if e.errno != errno.EEXIST: if e.errno != errno.EEXIST:
raise ValueError( raise ValueError(
"Unable to create to create the compiledir directory" "Unable to create the compiledir directory"
" '%s'. Check the permissions." % path) " '%s'. Check the permissions." % path)
# PROBLEM: sometimes the initial approach based on # PROBLEM: sometimes the initial approach based on
...@@ -118,7 +118,7 @@ def print_compiledir_content(): ...@@ -118,7 +118,7 @@ def print_compiledir_content():
compiledir = theano.config.compiledir compiledir = theano.config.compiledir
table = [] table = []
more_then_one_ops = 0 more_than_one_ops = 0
zeros_op = 0 zeros_op = 0
for dir in os.listdir(compiledir): for dir in os.listdir(compiledir):
file = None file = None
...@@ -131,7 +131,7 @@ def print_compiledir_content(): ...@@ -131,7 +131,7 @@ def print_compiledir_content():
if len(ops) == 0: if len(ops) == 0:
zeros_op += 1 zeros_op += 1
elif len(ops) > 1: elif len(ops) > 1:
more_then_one_ops += 1 more_than_one_ops += 1
else: else:
types = list(set([x for x in flatten(keydata.keys) types = list(set([x for x in flatten(keydata.keys)
if isinstance(x, theano.gof.Type)])) if isinstance(x, theano.gof.Type)]))
...@@ -142,7 +142,7 @@ def print_compiledir_content(): ...@@ -142,7 +142,7 @@ def print_compiledir_content():
if file is not None: if file is not None:
file.close() file.close()
print "List %d compiled individual op in this theano cache %s:" % ( print "List %d compiled individual ops in this theano cache %s:" % (
len(table), compiledir) len(table), compiledir)
print "sub directory/Op/a set of the different associated Theano type" print "sub directory/Op/a set of the different associated Theano type"
table = sorted(table, key=lambda t: str(t[1])) table = sorted(table, key=lambda t: str(t[1]))
...@@ -153,13 +153,12 @@ def print_compiledir_content(): ...@@ -153,13 +153,12 @@ def print_compiledir_content():
table_op_class[op.__class__] += 1 table_op_class[op.__class__] += 1
print print
print "List %d of individual compiled Op class and" % (len(table_op_class)), print "List %d of individual compiled Op classes and" % len(table_op_class),
print " the number of time it got compiled" print " the number of times they got compiled"
table_op_class = sorted(table_op_class.iteritems(), key=lambda t: t[1]) table_op_class = sorted(table_op_class.iteritems(), key=lambda t: t[1])
for op_class, nb in table_op_class: for op_class, nb in table_op_class:
print op_class, nb print op_class, nb
print ("Skipped %d files that contained more then" print ("Skipped %d files that contained more than"
" 1 op (was compiled with the c linker)" % (more_then_one_ops)) " 1 op (was compiled with the C linker)" % more_than_one_ops)
print ("Skipped %d files that contained 0 op" print ("Skipped %d files that contained 0 op "
"(Are they always theano.scalar ops?)" % ( "(are they always theano.scalar ops?)" % zeros_op)
more_then_one_ops))
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论