提交 07e32ea8 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Add test case as pickled arguments to theano.function

上级 11781d77
......@@ -2,6 +2,8 @@
import copy
import logging
import pickle
import os
import time
import unittest
......@@ -2645,6 +2647,13 @@ class test_shapeoptimizer(unittest.TestCase):
f = theano.function([X], expr, mode=mode)
print f([[1, 2], [2, 3]])
def test_no_cycle(self):
# Optimizing this graph resulted in a cycle, see gh-1549
pkl_filename = os.path.join(os.path.dirname(theano.__file__),
'tensor', 'tests', 'shape_opt_cycle.pkl')
fn_args = pickle.load(open(pkl_filename, "rb"))
theano.function(**fn_args)
class test_assert(utt.InferShapeTester):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论