jcjohnson / neural-style

Torch implementation of neural style algorithm
MIT License
18.31k stars 2.71k forks source link

Trouble getting CLTorch working #403

Closed atducey closed 7 years ago

atducey commented 7 years ago

I was intrigued by the concept of the neural-style network from reddit, and I've been working on getting it working for me. I installed an Ubuntu 16.04 Generic VM with 4 GB of RAM available, my processor is an Intel i5, and I have a Radeon 7950 HD with 3 GB of GRAM.

I've since installed torch, loadcaffe, luajit, and neural-style. I've got it working well enough when I pass the -gpu -1 parameter, I can get some good results. It takes about an hour though, so I wanted to get it working on my GPU. My understanding is that CuNN and CuDNN will only work on nVidia cards, so I installed OpenCL. I think I installed it right, but when I add the -backend clnn parameter instead of running in CPU mode, it immediately throws a C++ exception error with little other information.

Most threads I've seen with this error indicate that it is a problem with insufficient RAM. I don't think that's the issue here though, for a few reasons. The big one is that the error is thrown within seconds, before it's even begun iterating. Also, even if I add the -image_size 32 and -optimizer adam parameters, it still throws the C++ exception immediately.

Basically, I just need to know how to get a Radeon card to work with torch7 and neural-style. All help appreciated, if more info is needed I'll answer as best I can. This is my first time using Linux, so I might need questions to be phrased in very layman's terms.

atducey commented 7 years ago

Uh, nevermind, I guess. It works now...for some reason.