提交 21aaf13c authored 作者: sentient07's avatar sentient07

Reverted changes causing errors

上级 690b8a44
...@@ -2354,8 +2354,6 @@ def zeros(shape, dtype=None): ...@@ -2354,8 +2354,6 @@ def zeros(shape, dtype=None):
shape = [shape] shape = [shape]
if dtype is None: if dtype is None:
dtype = config.floatX dtype = config.floatX
if isinstance(shape, (list, tuple)) and len(shape) == 0:
return constant(0.0, dtype=dtype)
return alloc(numpy.array(0, dtype=dtype), *shape) return alloc(numpy.array(0, dtype=dtype), *shape)
...@@ -2367,8 +2365,6 @@ def ones(shape, dtype=None): ...@@ -2367,8 +2365,6 @@ def ones(shape, dtype=None):
shape = [shape] shape = [shape]
if dtype is None: if dtype is None:
dtype = config.floatX dtype = config.floatX
if isinstance(shape, (list, tuple)) and len(shape) == 0:
return constant(1.0, dtype=dtype)
return alloc(numpy.array(1, dtype=dtype), *shape) return alloc(numpy.array(1, dtype=dtype), *shape)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论