提交 461267fa authored 作者: Frederic's avatar Frederic

Small change following code review.

上级 6e470998
...@@ -5114,14 +5114,15 @@ class Choose(Op): ...@@ -5114,14 +5114,15 @@ class Choose(Op):
else: else:
import theano.typed_list import theano.typed_list
assert isinstance(node.inputs[1], theano.typed_list.TypedListVariable) assert isinstance(node.inputs[1], theano.typed_list.TypedListVariable)
#import pdb;pdb.set_trace() raise ShapeError("Case not implemented")
raise ShapeError("")
shape = shapes[0] shape = shapes[0]
for i in range(len(shapes[0])-1): for i in range(len(shapes[0])-1):
shape[i] = shapes[1][i] shape[i] = shapes[1][i]
return [(shape)] return [(shape)]
def make_node(self, a, choices): def make_node(self, a, choices):
# Import here as it isn't imported by default and we can't
# import at the top as it would cause circular import.
from theano import typed_list from theano import typed_list
a = as_tensor_variable(a) a = as_tensor_variable(a)
if isinstance(choices, (tuple, list)): if isinstance(choices, (tuple, list)):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论