提交 589b5926 authored 作者: Frédéric Bastien's avatar Frédéric Bastien 提交者: GitHub

Merge pull request #4806 from nouiz/python32bit

Fix daily buildbot error Python32bit
......@@ -230,7 +230,7 @@ def test_partial_function_with_updates():
def check_updates(linker_name):
x = tensor.lscalar('input')
y = theano.shared(1, name='global')
y = theano.shared(numpy.asarray(1, 'int64'), name='global')
f = theano.function([x], [x, x + 34], updates=[(y, x + 1)], mode=Mode(
optimizer=None, linker=linker_name))
g = theano.function([x], [x - 6], updates=[(y, y + 3)], mode=Mode(
......
......@@ -6974,9 +6974,9 @@ class FusionOptimizer(Optimizer):
print(blanc, " callback_time", prof[5], file=stream)
if prof[5] > 1:
print(blanc, " callbacks_time", file=stream)
for i in sorted(iteritems(prof[6]), key=lambda a: a[1]):
for i in sorted(iteritems(prof[6]), key=lambda a: a[1])[::-1]:
if i[1] > 0:
print(i)
print(blanc, " ", i)
print(blanc, " time_toposort", prof[7], file=stream)
......
......@@ -1776,14 +1776,13 @@ def test_local_useless_subtensor():
((slice(0, 3), slice(0, 13)), True),
((slice(0, 3), slice(0, 2)), False),
((slice(0, 1), slice(0, None)), False),
((slice(0, 1), 1), False),
]:
((slice(0, 1), 1), False)]:
f = function([x], tensor.exp(x_c).__getitem__(dims), mode=mode_opt)
# theano.printing.debugprint(f)
prog = f.maker.fgraph.toposort()
if res:
assert isinstance(prog[0].op, theano.tensor.SpecifyShape), dims
assert prog[1].op == tensor.exp, dims
assert prog[1].op == tensor.exp, (dims, prog)
assert len(prog) == 2, dims
else:
assert any([isinstance(node.op, Subtensor) for node in prog])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论