junyanz / iGAN

Interactive Image Generation via Generative Adversarial Networks
MIT License
3.97k stars 587 forks source link

pydoc ErrorDuringImport #10

Closed HyunmokMoon closed 7 years ago

HyunmokMoon commented 7 years ago

When I run this python, THEANO_FLAGS='device=cpu, floatX=float32, nvcc.fastmath=True' python iGAN_main.py --model_name outdoor_64

I got this error.

Traceback (most recent call last): File "iGAN_main.py", line 40, in model_class = locate('model_def.%s' % args.model_type) File "/usr/lib/python2.7/pydoc.py", line 1521, in locate nextmodule = safeimport(join(parts[:n+1], '.'), forceload) File "/usr/lib/python2.7/pydoc.py", line 342, in safeimport raise ErrorDuringImport(path, sys.exc_info()) pydoc.ErrorDuringImport: problem in model_def.dcgan_theano - <type 'exceptions.ImportError'>: No module named cuda.dnn

I already installed CUDA and cuDNN. How can I run this code? Thank you.

abracadaniel commented 7 years ago

I get the same error.

Running on Fedora 25.

python iGAN_main.py --model_name outdoor_64 Using cuDNN version 6021 on context None Mapped name None to device cuda0: GeForce GTX 1070 (0000:01:00.0) [n_iters] = 40 [top_k] = 16 [average] = False [morph_steps] = 16 [model_file] = ./models/outdoor_64.dcgan_theano [d_weight] = 0.0 [interp] = linear [batch_size] = 64 [framework] = theano [model_type] = dcgan_theano [shadow] = False [model_name] = outdoor_64 [win_size] = 384 Traceback (most recent call last): File "iGAN_main.py", line 40, in model_class = locate('model_def.%s' % args.model_type) File "/home/daniel/.anaconda2/envs/mlpy2/lib/python2.7/pydoc.py", line 1518, in locate nextmodule = safeimport(join(parts[:n+1], '.'), forceload) File "/home/daniel/.anaconda2/envs/mlpy2/lib/python2.7/pydoc.py", line 342, in safeimport raise ErrorDuringImport(path, sys.exc_info()) pydoc.ErrorDuringImport: problem in model_def.dcgan_theano - <type 'exceptions.ImportError'>: No module named cuda.dnn

abracadaniel commented 7 years ago

Okay I found a related issue: https://github.com/dimatura/voxnet/issues/18 It seems like the newest version if Theano does not support sandbox.cuda.

It works by downgrading Theano. pip install 'Theano<0.9.0'

also cudnn should be version 5, not 6. :)

junyanz commented 7 years ago

Thank @abracadaniel for the update!