提交 0440ea6e authored 作者: Olivier Mastropietro's avatar Olivier Mastropietro

Additional fixes of PEP8 errors

上级 0b5dbed9
......@@ -108,7 +108,7 @@ class T_OpFromGraph(unittest_tools.InferShapeTester):
fn = function([x, y, z], f)
assert numpy.allclose(15.0 + s.get_value(),
fn(xv, yv, zv))
def test_connection_pattern(self):
# Basic case
x, y, z = T.matrices('xyz')
......
......@@ -525,7 +525,7 @@ class Test_ViewMap(unittest.TestCase):
try:
f([1, 2, 3, 4], [5, 6, 7, 8])
assert False # DebugMode should have caught the error
except debugmode.BadViewMap as e:
except debugmode.BadViewMap:
# print e
pass
......
......@@ -351,10 +351,10 @@ class T_function(unittest.TestCase):
A special testcase for logistic_sgd.py in Deep Learning Tutorial
This test assert that SharedVariable in different function have same storage
"""
train_x = theano.shared(value=numpy.random.rand(10, 10).astype(config.floatX))
# train_x = theano.shared(value=numpy.random.rand(10, 10).astype(config.floatX))
test_x = theano.shared(value=numpy.random.rand(10, 10).astype(config.floatX))
train_y = theano.shared(value=numpy.random.rand(10, 1).astype(config.floatX))
# train_y = theano.shared(value=numpy.random.rand(10, 1).astype(config.floatX))
test_y = theano.shared(value=numpy.random.rand(10, 1).astype(config.floatX))
i = T.iscalar('index')
......@@ -363,9 +363,9 @@ class T_function(unittest.TestCase):
# this formular has no sense but for a test
out = (T.sum(x) - y) ** 2
out2 = (T.sum(x) + y) ** 2
train = theano.function([i], out,
givens={x: train_x[i], y: train_y[i]},
updates={train_x: train_x + 0.1})
# train = theano.function([i], out,
# givens={x: train_x[i], y: train_y[i]},
# updates={train_x: train_x + 0.1})
test_def = theano.function([i], out, givens={x: test_x[i], y: test_y[i]})
test_def2 = theano.function([i], out2, givens={x: test_x[i], y: test_y[i]})
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论