提交 f57371d0 authored 作者: David Warde-Farley's avatar David Warde-Farley

STY: pep8 from previous commit

上级 665861f3
...@@ -5159,22 +5159,22 @@ class test_size(unittest.TestCase): ...@@ -5159,22 +5159,22 @@ class test_size(unittest.TestCase):
def test_matrix(self): def test_matrix(self):
x = tensor.matrix() x = tensor.matrix()
y = numpy.zeros((5, 7), dtype = config.floatX) y = numpy.zeros((5, 7), dtype=config.floatX)
assert y.size == function([x], x.size)(y) assert y.size == function([x], x.size)(y)
def test_vector(self): def test_vector(self):
x = tensor.vector() x = tensor.vector()
y = numpy.zeros(7, dtype = config.floatX) y = numpy.zeros(7, dtype=config.floatX)
assert y.size == function([x], x.size)(y) assert y.size == function([x], x.size)(y)
def test_scalar(self): def test_scalar(self):
x = tensor.scalar() x = tensor.scalar()
y = numpy.array(7, dtype = config.floatX) y = numpy.array(7, dtype=config.floatX)
assert y.size == function([x], x.size)(y) assert y.size == function([x], x.size)(y)
def test_shared(self): def test_shared(self):
# NB: we also test higher order tensors at the same time. # NB: we also test higher order tensors at the same time.
y = numpy.zeros((1, 2, 3, 4), dtype = config.floatX) y = numpy.zeros((1, 2, 3, 4), dtype=config.floatX)
x = tensor.shared(y) x = tensor.shared(y)
assert y.size == function([], x.size)() assert y.size == function([], x.size)()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论