Skip to content

Commit

Permalink
Better error message when importing cuda_convnet under new GPU backend
Browse files Browse the repository at this point in the history
  • Loading branch information
f0k committed Dec 31, 2017
1 parent 5aadc1b commit 4b53b5c
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 4b53b5c

Please sign in to comment.