提交 9c25a920 authored 作者: Frederic's avatar Frederic

backport to python 2.4 and pep8.

上级 007540a5
import theano
from theano.gof.utils import give_variables_names, unique
from theano.gof.python25 import all
def test_give_variables_names():
x = theano.tensor.matrix('x')
......@@ -10,6 +12,7 @@ def test_give_variables_names():
assert all(var.name for var in variables)
assert unique([var.name for var in variables])
def test_give_variables_names_idempotence():
x = theano.tensor.matrix('x')
y = x + 1
......@@ -23,6 +26,7 @@ def test_give_variables_names_idempotence():
assert names == names2
def test_give_variables_names_small():
x = theano.tensor.matrix('x')
y = theano.tensor.dot(x, x)
......@@ -30,4 +34,3 @@ def test_give_variables_names_small():
give_variables_names(fgraph.variables)
assert all(var.name for var in fgraph.variables)
assert unique([var.name for var in fgraph.variables])
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论