junyanz / iGAN

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

if we do need to use CPU, what should we change ? #28

Open tqslj2 opened 5 years ago

junyanz commented 5 years ago

In THEANO_FLAGS, you can use device=cpu rather than device=gpu0.

tqslj2 commented 5 years ago

In THEANO_FLAGS, you can use device=cpu rather than device=gpu0.

thank you, but when i replace it by cpu, i have some new problems, if we just use cpu , does it mean that we do not need to download Cuda ? so do we need to change the codes ? cause i think in the code it uses some functions of GPU, the error messages are here :

[win_size] = 384 [average] = False [model_name] = outdoor_64 [batch_size] = 64 [interp] = linear [d_weight] = 0.0 [shadow] = False [model_type] = dcgan_theano [framework] = theano [n_iters] = 40 [model_file] = ./models/outdoor_64.dcgan_theano [morph_steps] = 16 [top_k] = 16 LOADING... n_layers= 3 load model from ./models/outdoor_64.dcgan_theano 3.22 seconds to load theano models Traceback (most recent call last): File "iGAN_main.py", line 43, in model = model_class.Model(model_name=args.model_name, model_file=args.model_file) File "/home/walter/Downloads/iGAN-master/model_def/dcgan_theano.py", line 26, in init self._gen = self.def_gen(self.gen_params, self.gen_batchnorm, n_layers=self.n_layers, n_f=self.n_f, nc=self.nc) File "/home/walter/Downloads/iGAN-master/model_def/dcgan_theano.py", line 39, in def_gen gx = gen_test(z, gen_params, gen_pl, n_layers=n_layers, n_f=n_f, nc=nc, use_tanh=False) File "/home/walter/Downloads/iGAN-master/model_def/dcgan_theano.py", line 225, in gen_test hout = relu(batchnorm(deconv(hin, w, subsample=(2, 2), border_mode=(2, 2)), u=u, s=s, g=g, b=b)) File "/home/walter/Downloads/iGAN-master/lib/ops.py", line 101, in deconv d_img = GpuDnnConvGradI()(kerns, img, out, desc) File "/usr/local/lib/python3.5/dist-packages/theano/sandbox/cuda/dnn.py", line 859, in init if version() < (5000, 5000): File "/usr/local/lib/python3.5/dist-packages/theano/sandbox/cuda/init.py", line 424, in dnn_version dnn_available.msg) Exception: ("We can't determine the cudnn version as it is not available", 'CUDA not available')

thanks so much for your reply !!