提交 752d5028 authored 作者: abergeron's avatar abergeron

Merge pull request #3961 from nouiz/test

Fix a test on GPU with mode=FAST_COMPILE
...@@ -35,7 +35,7 @@ install: ...@@ -35,7 +35,7 @@ install:
env: env:
- PART="theano/sandbox theano/sparse theano/scalar theano/tensor/nnet theano/scan_module" - PART="theano/sandbox theano/sparse theano/scalar theano/tensor/nnet theano/scan_module"
- PART="theano/tensor/tests/test_basic.py theano/tensor/signal theano/compile theano/gof theano/misc theano/tests theano/compat" - PART="theano/tensor/tests/test_basic.py theano/tensor/signal theano/compile theano/gof theano/misc theano/tests theano/compat"
- PART="-e test_basic.py theano/tensor/tests" - PART="-e test_basic.py theano/tensor/tests theano/d3viz"
matrix: matrix:
fast_finish: true fast_finish: true
......
...@@ -77,7 +77,7 @@ def d3viz(fct, outfile, copy_deps=True, *args, **kwargs): ...@@ -77,7 +77,7 @@ def d3viz(fct, outfile, copy_deps=True, *args, **kwargs):
# Create DOT graph # Create DOT graph
formatter = PyDotFormatter(*args, **kwargs) formatter = PyDotFormatter(*args, **kwargs)
graph = formatter(fct) graph = formatter(fct)
dot_graph = escape_quotes(graph.create_dot()).replace('\n', '').replace('\r', '') dot_graph = escape_quotes(str(graph.create_dot())).replace('\n', '').replace('\r', '')
# Create output directory if not existing # Create output directory if not existing
outdir = os.path.dirname(outfile) outdir = os.path.dirname(outfile)
......
...@@ -45,6 +45,7 @@ def my_rand(*shape): ...@@ -45,6 +45,7 @@ def my_rand(*shape):
class TestBatchedDot(unittest_tools.InferShapeTester): class TestBatchedDot(unittest_tools.InferShapeTester):
mode = mode_with_gpu
def test_batched_dot_correctness(self): def test_batched_dot_correctness(self):
......
...@@ -55,7 +55,7 @@ def test_pydotprint_return_image(): ...@@ -55,7 +55,7 @@ def test_pydotprint_return_image():
x = tensor.dvector() x = tensor.dvector()
ret = theano.printing.pydotprint(x * 2, return_image=True) ret = theano.printing.pydotprint(x * 2, return_image=True)
assert isinstance(ret, str) assert isinstance(ret, (str, bytes))
def test_pydotprint_variables(): def test_pydotprint_variables():
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论