Keras: Error: AbstractConv2d Theano optimization failed

Created on 29 May 2016  Â·  16Comments  Â·  Source: keras-team/keras

Hi people.
I'm new to both Neural networks and Keras.
I'm working on ipython notebook & Windows 8.1 on CPU.

I'm getting this error while trying to train the network:
AssertionError: AbstractConv2d Theano optimization failed: there is no implementation available supporting the requested options. Did you exclude both "conv_dnn" and "conv_gemm" from the optimizer? If on GPU, is cuDNN available and does the GPU support it? If on CPU, do you have a BLAS library installed Theano can link against?

I've looked at similar issues on Theano/Keras github issues page.
Almost all the solutions pointed towards updating Theano & Keras.
I've tried updating both of them, and that didn't resolve the issue.

Is the issue in how we give the images to the training function(model.fit)?
In what format should the 2D grey scale images be given as the training set?
Could someone please help me out in fixing this.

Please find the link to the code & error here

Most helpful comment

met the same problem and fixed by adding "optimizer = None" in ".theanorc"

All 16 comments

It means you need to install a BLAS (in order to run on CPU). Look at http://www.openblas.net/

I've tried hard to link BLAS to theano, but had no luck. Eventually I gave up on installing Theano on windows.
Why don't you try installing the same libraries on some distribution of Linux. Its very simple compared to windows.

Installing the Theano with blas on Windows should be simple with anaconda.
It is the GPU that is hard. At least from memory. I didn't do it recently.

Using Linux will make sure you have the best Theano experience as this is
what we use to develop it.

Fred

Le 14 sept. 2016 05:20, "Bakaraju Vivek" [email protected] a
écrit :

I've tried hard to link BLAS to theano, but had no luck. Eventually I gave
up on installing Theano on windows.
Why don't you try installing the same libraries on some distribution of
Linux. Its very simple compared to windows.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/fchollet/keras/issues/2845#issuecomment-246954677,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AALC-8oKr4KczoAfQoKkjvr5U9SmwjTsks5qp7xNgaJpZM4IpVjN
.

Still having this problem. in 2016 Dec 18

My system is Windows 7 pro sp1. Blas and Theano are installed but still having exactly same error.

Please someone look into it.

Thank you.

This should be working. Be sure to install Python with Anaconda and install
Theano dev version. It was tested recently and it was working.

On Sun, Dec 18, 2016 at 10:22 AM, Lothian notifications@github.com wrote:

Still having this problem. in 2016 Dec 18

My system is Windows 7 pro sp1. Blas and Theano are installed but still
having exactly same error.

Please someone look into it.

Thank you.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/fchollet/keras/issues/2845#issuecomment-267827161,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AALC-_787xI6nSi_-XdML8iPIO4MdjKfks5rJU-xgaJpZM4IpVjN
.

@nouiz
I am using a ubuntu 32 bit system and installed keras and theano and openblas by building but still getting the error
my config file is :
[global]
floatX = float32
device = cpu

[blas]
ldflags = -L/usr/local/lib -lopenblas

and ERROR is
ERROR (theano.gof.opt): Optimization failure due to: local_abstractconv_check
ERROR (theano.gof.opt): node: AbstractConv2d{border_mode='half', subsample=(1, 1), filter_flip=True, imshp=(None, None, None, None), kshp=(32, 3, 3, 3)}(convolution2d_input_3, convolution2d_9_W)
ERROR (theano.gof.opt): TRACEBACK:
ERROR (theano.gof.opt): Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/theano/gof/opt.py", line 1772, in process_node
replacements = lopt.transform(node)
File "/usr/local/lib/python2.7/dist-packages/theano/tensor/nnet/opt.py", line 402, in local_abstractconv_check
node.op.__class__.__name__)
AssertionError: AbstractConv2d Theano optimization failed: there is no implementation available supporting the requested options. Did you exclude both "conv_dnn" and "conv_gemm" from the optimizer? If on GPU, is cuDNN available and does the GPU support it? If on CPU, do you have a BLAS library installed Theano can link against?

met the same problem and fixed by adding "optimizer = None" in ".theanorc"

I can confirm that on Windows 7 64 bit and trying lapack and openblas, there appears to be no compatibility with blas and theano and the abstractconv2d error always turns up. Certainly setting optimizer=None goes around the problem but at the expense of no optimisation and therefore only useful for code debugging (slowly) and not running training.

I run two Pascal gpu's but I would really like to also run on CPU for development and debug so as not to tie one up as they run 24/7.

One possible problem is that the error message is not related to the problem, for instance the actual blas lib may be of an incompatible build to theano. I tried 32 and 64 bit binaries. Mingw64 is installed and there are no problems with compiling for GPU (it is really easy once you have done it and documented the procedure for yourself).

Would it be possible for the theano team to try out a vanilla win64 box and bring it up with Anaconda2 and a fresh theano install, find and install to taste a blas version, document the procedure precisely with all bells and whistle, and link it out from the main theano page on deeplearning.net for all to access directly ? Thanks and much appreciated Frederic.

Best regards, Brendan

Continuum is doing conda packages for Theano that include mkl. While doing
so, they pushed upstream fixes to have Theano link with there mkl version.
So now again, Theano link with anaconda mkl on windows.

The current packages aren't on the master of anaconda. They will be there
when we release Theano 0.9. We have the packages for the beta and new
packages (still at non default place) should be done this week after the rc.

Can you confirm that this will fix your issue? Updating Theano do the dev
version and using anaconda while installaing the packages "mkl-service"
should have you working well right now.

On Mon, Jan 23, 2017 at 12:39 PM brendanruff notifications@github.com
wrote:

I can confirm that on Windows 7 64 bit and trying lapack and openblas,
there appears to be no compatibility with blas and theano and the
abstractconv2d error always turns up. Certainly setting optimizer=None goes
around the problem but at the expense of no optimisation and therefore only
useful for code debugging (slowly) and not running training.

I run two Pascal gpu's but I would really like to also run on CPU for
development and debug so as not to tie one up as they run 24/7.

One possible problem is that the error message is not related to the
problem, for instance the actual blas lib may be of an incompatible build
to theano. I tried 32 and 64 bit binaries. Mingw64 is installed and there
are no problems with compiling for GPU (it is really easy once you have
done it and documented the procedure for yourself).

Would it be possible for the theano team to try out a vanilla win64 box
and bring it up with Anaconda2 and a fresh theano install, find and install
to taste a blas version, document the procedure precisely with all bells
and whistle, and link it out from the main theano page on deeplearning.net
for all to access directly ? Thanks and much appreciated Frederic.

Best regards, Brendan

—
You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
https://github.com/fchollet/keras/issues/2845#issuecomment-274560510,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AALC-_wioHSardYgYBuAquYy-ZE-87kMks5rVOXEgaJpZM4IpVjN
.

I'm also getting the same error but still was unable to find a fix.

I am also facing the same error
AssertionError: AbstractConv2d Theano optimization failed: there is no implementation available supporting the requested options. Did you exclude both "conv_dnn" and "conv_gemm" from the optimizer? If on GPU, is cuDNN available and does the GPU support it? If on CPU, do you have a BLAS library installed Theano can link against?

I aslo installed blas library but all is fruitless
blas

.theanorc.txt
[global]
floatX = float32
device = cpu
optimizer = None

add this as .theanorc.txt to C:/ users/whatever
Hope this helps.

@suvodip1212
[global]
floatX = float32
device = cpu
optimizer = None
thanks,this method help me resolve this issue

@duqq where i can add this method ?

Do

import os
os.environ['THEANO_FLAGS'] = 'optimizer=None'

instead

Do

import os
os.environ['THEANO_FLAGS'] = 'optimizer=None'

instead

thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

braingineer picture braingineer  Â·  3Comments

rantsandruse picture rantsandruse  Â·  3Comments

harishkrishnav picture harishkrishnav  Â·  3Comments

somewacko picture somewacko  Â·  3Comments

anjishnu picture anjishnu  Â·  3Comments