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

A fix to a bug that I was getting when infer shape was getting a long

instead of int .. not sure why but I don't see anything wrong with that
上级 f10a85bd
...@@ -603,7 +603,7 @@ class ShapeFeature(object): ...@@ -603,7 +603,7 @@ class ShapeFeature(object):
if s_i == 1: if s_i == 1:
# don't make the optimizer merge a zillion ones together # don't make the optimizer merge a zillion ones together
return self.lscalar_one return self.lscalar_one
if type(s_i) is int or isinstance(s_i, numpy.integer): if type(s_i) in (int,long) or isinstance(s_i, numpy.integer):
# this shape is a constant # this shape is a constant
assert s_i >= 0 assert s_i >= 0
return T.constant(s_i, dtype='int64') return T.constant(s_i, dtype='int64')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论