Theano CNN on CPU: AbstractConv2d Theano optimization failed

前端 未结 3 2013
长情又很酷
长情又很酷 2021-02-19 05:07

I\'m trying to train a CNN for object detection on images with the CIFAR10 dataset for a seminar at my university but I get the following Error:

Assertion

相关标签:
3条回答
  • 2021-02-19 05:32

    Add one line to .theanorc file

    optimizer = None
    

    as a global configuration.

    0 讨论(0)
  • 2021-02-19 05:35

    I had same error message on Windows. My ".theanorc.txt" file located in "C:\Users\USERNAME\.theanorc.txt" was wrongly formatted and Blas library wasn't found by Theano. This can be seen in Python console by writing "import theano; theano.config.blas.ldflags" which gave blank string (''). The blas-keyword has to be as section header.

    [global]
    floatX = float32
    device = cpu
    
    [blas]
    ldflags = -LC:\\openblas -lopenblas
    

    In C:\openblass path I have files: libgcc_s_seh-1.dll, libgfortran-3.dll, libopenblas.dll and libquadmath-0.dll. Refer to http://deeplearning.net/software/theano/library/config.html

    0 讨论(0)
  • 2021-02-19 05:44

    I had the same problem but under Linux. It turned out that BLAS was not installed at all, and I had to install it separately, including setting some new environment variables:

    export LD_LIBRARY_PATH="/home/username/anaconda2/lib"
    export LD_PRELOAD="/home/username/anaconda2/lib/libmkl_core.so:/home/MEDIANET/aharjunm/anaconda2/lib/libmkl_sequential.so"
    

    I also had to make sure that there were no conflicting python paths between anaconda and any previous python installation.

    I know that it's going to be vastly different under Windows, but because the error message is exactly the same, the basic premise for a cure should be the same as well: install BLAS. You can find plenty of sources for that, for example here.

    0 讨论(0)
提交回复
热议问题