提交 11247235 authored 作者: James Bergstra's avatar James Bergstra

added some diagnostic info to local_fill_alloc, for when it tries to change the

output type, which should never happen...
上级 7a1c88df
...@@ -488,7 +488,14 @@ def local_fill_to_alloc(node): ...@@ -488,7 +488,14 @@ def local_fill_to_alloc(node):
shape_of = node.env.shape_feature.shape_of shape_of = node.env.shape_feature.shape_of
# TODO: cut out un-necessary dimshuffles of v # TODO: cut out un-necessary dimshuffles of v
rval = [T.alloc(T.cast(v, node.outputs[0].dtype), *shape_of[node.outputs[0]])] rval = [T.alloc(T.cast(v, node.outputs[0].dtype), *shape_of[node.outputs[0]])]
assert rval[0].type == node.outputs[0].type
if rval[0].type != node.outputs[0].type:
print >> sys.stderr, theano.printing.debugprint(node.outputs[0], file='str')
assert rval[0].type == node.outputs[0].type, ('rval', rval[0].type,
'orig', node.outputs[0].type,
'node', node,
)#theano.printing.debugprint(node.outputs[0], file='str'))
return rval return rval
@register_specialize @register_specialize
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论