Skip to content

Commit

Permalink
Merge pull request #889 from f0k/cclayer-backend-error
Browse files Browse the repository at this point in the history
Better error message when importing cuda_convnet under new GPU backend
  • Loading branch information
f0k committed Feb 21, 2018
2 parents 5aadc1b + 4b53b5c commit 8ea1de6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lasagne/layers/cuda_convnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@
from .pool import pool_output_length
from ..utils import as_tuple

# bail out if using Theano's new GPU backend
try:
from theano import gpuarray
except ImportError:
from theano.sandbox import gpuarray
if gpuarray.pygpu_activated:
raise ImportError("cuda_convnet is not supported under Theano's new "
"GPU backend. Please either use the ordinary "
"convolutional and pooling layers (they are usually "
"faster), or use Theano's old GPU backend (available "
"up to Theano 0.9).") # pragma: no cover

from theano.sandbox.cuda.basic_ops import gpu_contiguous
from pylearn2.sandbox.cuda_convnet.filter_acts import FilterActs

Expand Down

0 comments on commit 8ea1de6

Please sign in to comment.