提交 349848f4 authored 作者: Razvan Pascanu's avatar Razvan Pascanu

until class should expect just a condition

fix following Pascal's suggestion
上级 3ead1a85
......@@ -78,25 +78,9 @@ class until(object):
order, but since this was not impose up to know it can make quite a bit
of code to fail).
"""
def __init__(self, condition, outputs = None, updates = None):
def __init__(self, condition):
self.condition = tensor.as_tensor_variable(condition)
assert self.condition.ndim == 0
if outputs is None:
self.outputs = []
elif type(outputs) in (list, tuple):
self.outputs = list(outputs)
else:
self.outptus = [outputs]
if updates is None:
self.updates = {}
elif type(updates) is dict:
self.updates = updates
elif type(udpates) is (list, tuple):
self.updates = dict(updates)
else:
raise Exception( ('Scan could not parse the returned values by'
' the lambda function describing the inner'
' operations of scan '))
def traverse(out, x,x_copy, d):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论