提交 d8d752f7 authored 作者: Frederic's avatar Frederic

Make Alloc.__call__ support the return_list parameter

上级 54e3b53d
......@@ -2543,7 +2543,7 @@ class Alloc(gof.Op):
#change.
return [gx] + [DisconnectedType()() for i in inputs[1:]]
def __call__(self, val, *shapes):
def __call__(self, val, *shapes, **kwargs):
"""
If the alloc would be useless, this function returns val.
......@@ -2554,7 +2554,7 @@ class Alloc(gof.Op):
If you always want an Alloc node, call make_node.
"""
ret = super(Alloc, self).__call__(val, *shapes)
ret = super(Alloc, self).__call__(val, *shapes, **kwargs)
try:
# It makes optimization difficult when useless allocs are thrown
# into the graph at every stage of optimization. This little logic
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论