提交 a6e974f7 authored 作者: projects@lgcm's avatar projects@lgcm

gen oplist no longer runs on import

上级 ba5d6da9
...@@ -45,14 +45,16 @@ def chomp(s): ...@@ -45,14 +45,16 @@ def chomp(s):
return "".join(r) return "".join(r)
import scalar, sparse, tensor def generate():
"""Generate the op list"""
import scalar, sparse, tensor
print_title("Theano Op List", "~") print_title("Theano Op List", "~")
print "" print ""
print ".. contents:: " print ".. contents:: "
print "" print ""
for module in [scalar, sparse, tensor]: for module in [scalar, sparse, tensor]:
print_title('module: `%s`' % module.__name__, '=') print_title('module: `%s`' % module.__name__, '=')
print_title('Op Classes', '-') print_title('Op Classes', '-')
...@@ -94,3 +96,5 @@ for module in [scalar, sparse, tensor]: ...@@ -94,3 +96,5 @@ for module in [scalar, sparse, tensor]:
# a little trailing whitespace # a little trailing whitespace
print "" print ""
if __name__ == "__main__":
generate()
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论