提交 f8cbc2d9 authored 作者: Frederic Bastien's avatar Frederic Bastien

fix 2 tests on 32 bits computer.

上级 aba58aec
......@@ -2,7 +2,7 @@ import numpy
import unittest
import copy
import theano
from theano.tensor import Tensor, dmatrix, dvector, lscalar, dmatrices
from theano.tensor import dmatrix, iscalar, lscalar, dmatrices
from theano import tensor
from theano.compile.sharedvalue import *
......@@ -407,7 +407,10 @@ class Test_pfunc(unittest.TestCase):
def test_default_updates_input(self):
x = shared(0)
y = shared(1)
a = lscalar('a')
if theano.gof.cmodule.local_bitwidth()==32:
a = iscalar('a')
else:
a = lscalar('a')
x.default_update = y
y.default_update = y+a
......
......@@ -16,7 +16,10 @@ class Test_SharedVariable(unittest.TestCase):
assert shared(7, dtype='float64').type == Scalar('float64')
else:
assert shared(7).type == theano.tensor.lscalar, shared(7).type
if theano.gof.cmodule.local_bitwidth()==32:
assert shared(7).type == theano.tensor.iscalar, shared(7).type
else:
assert shared(7).type == theano.tensor.lscalar, shared(7).type
assert shared(7.0).type == theano.tensor.dscalar
assert shared(numpy.float32(7)).type == theano.tensor.fscalar
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论