提交 c710fb2d authored 作者: Razvan Pascanu's avatar Razvan Pascanu

scan bug fixed

上级 c7a9ac80
...@@ -475,12 +475,15 @@ class Scan(theano.Op): ...@@ -475,12 +475,15 @@ class Scan(theano.Op):
if inplace_map.has_key(i) and (inplace_map[i] >= 0): if inplace_map.has_key(i) and (inplace_map[i] >= 0):
y += [args[inplace_map[i]]] y += [args[inplace_map[i]]]
else: else:
arg_shape = args[i+n_seqs].shape[1:]
if not self.outs_taps.has_key(i):
arg_shape = args[i+n_seqs].shape
if self.stored_steps_output[i] < 1 : if self.stored_steps_output[i] < 1 :
y_shape = (n_steps,)+args[i+n_seqs].shape[1:] y_shape = (n_steps,)+arg_shape
elif self.stored_steps_output[i] == 1: elif self.stored_steps_output[i] == 1:
y_shape = args[i+n_seqs].shape[1:] y_shape = arg_shape
else: else:
y_shape = (self.stored_steps_output[i],)+args[i+n_seqs].shape[1:] y_shape = (self.stored_steps_output[i],)+arg_shape
y += [numpy.empty(y_shape, y += [numpy.empty(y_shape,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论