def test_sanitize(): x = theano.tensor.matrix('x') y = x.T z = y + 1 sanitize((x, ), (z, )) assert all(v.name and '.' not in v.name for v in (x, y, z)) assert unique((x, y, z)) print x, y, z
def test_sanitize(): x = theano.tensor.matrix('x') y = x.T z = y + 1 sanitize((x,), (z,)) assert all(v.name and '.' not in v.name for v in (x,y,z)) assert unique((x,y,z)) print x, y, z
def test_unique(): assert unique('abc') assert not unique('aab')