提交 bfae3bc0 authored 作者: Valentin Bisson's avatar Valentin Bisson

Wrote theano.tensor.opt.Assert class docstring, using some info found in the mailing list.

上级 18592e73
...@@ -1212,6 +1212,13 @@ def local_alloc_unary(node): ...@@ -1212,6 +1212,13 @@ def local_alloc_unary(node):
class Assert(T.Op): class Assert(T.Op):
"""
Implements assertion in a computational graph.
Notes:
This Op can be removed from the graph because of optimizations. Also, the
output of the Op must be returned by the function computing the graph,
otherwise it will not be used.
"""
view_map = {0: [0]} view_map = {0: [0]}
def make_node(self, value, *conds): def make_node(self, value, *conds):
...@@ -1254,7 +1261,6 @@ class Assert(T.Op): ...@@ -1254,7 +1261,6 @@ class Assert(T.Op):
%(out)s = %(value)s; %(out)s = %(value)s;
Py_INCREF(%(value)s); Py_INCREF(%(value)s);
""" % locals() """ % locals()
pass
def c_code_cache_version(self): def c_code_cache_version(self):
return (0, 1) return (0, 1)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论