• notoraptor's avatar
    Update to fix python 3 error · 27f49908
    notoraptor 提交于
    Update test function test_pycuda_memory_to_theano() to fix Python 3 error.
    
    The refcount of a variable seems to be different between Python 2 and Python 3. So it seems better to stock an initial refcount in a variable and then do the checkings with that variable instead of directly using comparing to constant values.
    
    Tests passed with Python 3 (Anaconda):
    
    ```
    $ nosetests --verbose --nocapture theano/misc/tests/test_pycuda_theano_simple.py
    Run pycuda only example to test that pycuda works. ... ok
    Simple example with pycuda function and Theano CudaNdarray object. ... ok
    theano.misc.tests.test_pycuda_theano_simple.test_pycuda_memory_to_theano ... 4
    gpuarray ref count before creating a CudaNdarray 4
    strides (20, 5, 1)
    gpuarray ref count after creating a CudaNdarray 5
    gpuarray ref count after deleting the CudaNdarray 4
    ok
    
    ----------------------------------------------------------------------
    Ran 3 tests in 0.297s
    
    OK
    ```
    27f49908
名称
最后提交
最后更新
..
__init__.py 正在载入提交数据...
test_cudamat_utils.py 正在载入提交数据...
test_gnumpy_utils.py 正在载入提交数据...
test_may_share_memory.py 正在载入提交数据...
test_pkl_utils.py 正在载入提交数据...
test_pycuda_example.py 正在载入提交数据...
test_pycuda_theano_simple.py 正在载入提交数据...
test_pycuda_utils.py 正在载入提交数据...