

def test_1(self):
    x = T.matrix()
    mode = ProfileMode()
    theano.function([x], (x * 2), mode=mode)
    default_mode = theano.compile.mode.get_default_mode()
    modified_mode = default_mode.including('specialize')
    copy.deepcopy(modified_mode)
    linker = theano.compile.mode.get_default_mode().linker
    assert ((not hasattr(linker, 'fgraph')) or (linker.fgraph is None))

dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/compile/tests/test_modes.py T_ProfileMode_WrapLinker.test_1/original