chainer-neural-style
chainer-neural-style copied to clipboard
Cpu mode support?
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 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.