Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tqslj2 opened this issue Jul 1, 2019 · 2 comments
Open

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

tqslj2 opened this issue Jul 1, 2019 · 2 comments

Comments

@tqslj2
Copy link

tqslj2 commented Jul 1, 2019

No description provided.

@junyanz
Copy link
Owner

junyanz commented Jul 1, 2019

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

@tqslj2
Copy link
Author

tqslj2 commented Jul 2, 2019

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 !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants