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

Cpu mode support? #8

Open
jmic00 opened this issue Jul 1, 2017 · 1 comment
Open

Cpu mode support? #8

jmic00 opened this issue Jul 1, 2017 · 1 comment

Comments

@jmic00
Copy link

jmic00 commented Jul 1, 2017

Looks like --gpu -1 flag doesn't affect for program.

When I use this command:
python src/run.py -c re.jpg -s 4.jpg --gpu -1
I receive this output:
loading content image completed
loading style image completed
loading neural network model completed
Traceback (most recent call last):
File "src/run.py", line 51, in <module>
style_transfer_runner.run(args)
File "/home/z/cns/src/style_transfer_runner.py", line 73, in run
out_image = model.fit(content_image, style_image, args.iter, on_epoch_done)
File "/home/z/cns/src/neural_style.py", line 34, in fit
with cuda.Device(device_id):
AttributeError: 'module' object has no attribute 'Device'

Same output with command without --gpu flag at all

@jmic00 jmic00 changed the title Cpu only support? Cpu mode support? Jul 1, 2017
@dsanno
Copy link
Owner

dsanno commented Jul 3, 2017

@jmic00
Thank you for your report

cuda.Device depends on 'cupy' module doesn't work without 'cupy', so I shouldn't have use it.
I fixed to use cuda.get_device_from_id instead of it.

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