hughperkins / clnn

OpenCL backend for Torch nn neural networks library
BSD 2-Clause "Simplified" License
126 stars 16 forks source link

neural-style with clnn backend #17

Closed susloparovdenis closed 8 years ago

susloparovdenis commented 8 years ago

I fixed using neural-style with clnn backend in my repo https://github.com/susloparovdenis/neural-style When I run it with -gpu 0 -backend clnn parameters I get following warnings

Successfully loaded /home/denis/Workspace/Art/neural-style//models/vgg_normalised.caffemodel
conv1_1: 64 3 3 3
conv1_2: 64 64 3 3
conv2_1: 128 64 3 3
conv2_2: 128 128 3 3
conv3_1: 256 128 3 3
conv3_2: 256 256 3 3
conv3_3: 256 256 3 3
conv3_4: 256 256 3 3
conv4_1: 512 256 3 3
conv4_2: 512 512 3 3
conv4_3: 512 512 3 3
conv4_4: 512 512 3 3
conv5_1: 512 512 3 3
conv5_2: 512 512 3 3
conv5_3: 512 512 3 3
conv5_4: 512 512 3 3
Using Advanced Micro Devices, Inc. , OpenCL platform: AMD Accelerated Parallel Processing
Using OpenCL device: Tahiti
Setting up style layer      2   :   relu1_1 
Setting up style layer      7   :   relu2_1 
THClReduceAll.cl build log: 
"/tmp/OCLI7nvej.cl", line 9: warning: variable "in1" was declared but never
          referenced
    float *in1 = &_in1;
           ^

"/tmp/OCLI7nvej.cl", line 10: warning: variable "out" was declared but never
          referenced
    float *out = &_out;
           ^

Setting up style layer      12  :   relu3_1 
Setting up style layer      21  :   relu4_1 
Setting up content layer    23  :   relu4_2 
Setting up style layer      30  :   relu5_1 

The result image differes a lot from image with nn backend

hughperkins commented 8 years ago

The warnings are normal. You can ignore. As far as 'the image differs a lot', please see this thread: https://github.com/jcjohnson/neural-style/issues/44 Basically, you're going to need to use a bleeding-edge nn build, and a bleeding-edge clnn build, for now. Pending merge of https://github.com/torch/nn/pull/365

susloparovdenis commented 8 years ago

Thanks, You cleared things up!