Newmu / dcgan_code

Deep Convolutional Generative Adversarial Networks
MIT License
3.42k stars 696 forks source link

ImportError: cannot import name gpu_alloc_empty #5

Closed genekogan closed 8 years ago

genekogan commented 8 years ago

i'm getting an import error on the gpu_alloc_empty in the following:

from theano.sandbox.cuda.basic_ops import (as_cuda_ndarray_variable,
                                           host_from_gpu,
                                           gpu_contiguous, HostFromGpu,
                                           gpu_alloc_empty)

the other modules by themselves work fine, just gpu_alloc_empty fails. i have cudnn installed and just reinstalled Theano with pip.

genekogan commented 8 years ago

i figured it out. install the bleeding edge version of Theano instead of the latest on pip. can do via.

pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git
dribnet commented 8 years ago

FWIW: my version of Theano was initially too new (Theano/Theano@8d3a67b7) so I had to back-install the latest tagged release, which also worked for me.

pip uninstall theano
pip install --no-deps git+https://github.com/Theano/Theano.git@rel-0.7.1a1#egg=Theano==0.8.git