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

Commented out the reading of the shape from tag, after talking with Fred I

found out this is not the right way of doing it, and there is a much better(tested) way, namely specify_shape
上级 7685c4a0
......@@ -573,11 +573,14 @@ class ShapeFeature(object):
if hasattr(r.type,"broadcastable") and r.type.broadcastable[i]:
return self.lscalar_one
# NOTE: This may cause problems bacause the shape is not asserted
# there is an equivalent mechanism to do this, namely
# specify_shape that one should use
# If user provided size
elif ( hasattr(r.tag,'shape') and
r.tag.shape is not None and
r.tag.shape[i] is not None):
return T.constant(copy.copy(r.tag.shape[i]),dtype='int64')
#elif ( hasattr(r.tag,'shape') and
# r.tag.shape is not None and
# r.tag.shape[i] is not None):
# return T.constant(copy.copy(r.tag.shape[i]),dtype='int64')
else:
return Shape_i(i).make_node(r).outputs[0]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论