Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: AbstractConv2d Theano optimization failed #2845

Closed
Vivek-B opened this issue May 29, 2016 · 16 comments
Closed

Error: AbstractConv2d Theano optimization failed #2845

Vivek-B opened this issue May 29, 2016 · 16 comments

Comments

@Vivek-B
Copy link

Vivek-B commented May 29, 2016

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

@fchollet
Copy link
Member

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

@Vivek-B
Copy link
Author

Vivek-B commented Sep 14, 2016

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.

@nouiz
Copy link
Contributor

nouiz commented Sep 15, 2016

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" notifications@github.com 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
#2845 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AALC-8oKr4KczoAfQoKkjvr5U9SmwjTsks5qp7xNgaJpZM4IpVjN
.

@ghost
Copy link

ghost commented Dec 18, 2016

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.

@nouiz
Copy link
Contributor

nouiz commented Dec 22, 2016 via email

@catchabhisek
Copy link

@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?

@tommylicc
Copy link

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

@brendanruff
Copy link

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

@nouiz
Copy link
Contributor

nouiz commented Feb 14, 2017 via email

@hiroshiperera
Copy link

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

@Khalidhussain1134
Copy link

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

@suvodip1212
Copy link

suvodip1212 commented Jul 17, 2018

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

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

@Qianqian3764
Copy link

Qianqian3764 commented Oct 4, 2018

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

@amrramadan
Copy link

@duqq where i can add this method ?

@kevin2107
Copy link

Do

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

instead

@kia350
Copy link

kia350 commented Nov 25, 2019

Do

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

instead

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests