fast-neural-style icon indicating copy to clipboard operation
fast-neural-style copied to clipboard

Training new model with OpenCL backend

Open lukaszarczynski opened this issue 7 years ago • 4 comments

Does it work? I've encountered following error and I'm not sure if it is fault of my configuration, fast-neural-style or cltorch

} (15): nn.SpatialFullConvolution(128 -> 64, 3x3, 2,2, 1,1, 1,1) (16): nn.InstanceNormalization (17): nn.ReLU (18): nn.SpatialFullConvolution(64 -> 32, 3x3, 2,2, 1,1, 1,1) (19): nn.InstanceNormalization (20): nn.ReLU (21): nn.SpatialConvolution(32 -> 3, 9x9, 1,1, 4,4) (22): nn.Tanh (23): nn.MulConstant (24): nn.TotalVariation } /home/lukasz/torch-cl/install/bin/luajit: ./fast_neural_style/GramMatrix.lua:44: Not implemented at /home/lukasz/torch-cl/opencl/cltorch/src/lib/THClTensorMathBlas.cpp:427 stack traceback: [C]: in function 'bmm' ./fast_neural_style/GramMatrix.lua:44: in function 'forward' ./fast_neural_style/StyleLoss.lua:40: in function 'updateOutput' .../lukasz/torch-cl/install/share/lua/5.1/nn/Sequential.lua:44: in function 'forward' ./fast_neural_style/PerceptualCriterion.lua:78: in function 'setStyleTarget' train.lua:134: in function 'main' train.lua:327: in main chunk [C]: in function 'dofile' ...z/torch-cl/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk [C]: at 0x00405ea0

lukaszarczynski avatar Nov 09 '16 02:11 lukaszarczynski

I experienced a similar error. I solved it by updating my CUDA installation (from 7.5 to 8.0), and then reinstalling cutorch and cunn. I also updated cuDNN. For some reason cuDNN v5.1 for CUDA 8.0 caused a similar error to show up, but when I downgraded to cuDNN v5.0 for CUDA 8.0, everything worked out.

Runescaped avatar Nov 20 '16 02:11 Runescaped

Seems that cltorch has not implemented this function yet (and they are not really working on this, according to this timeline).

ApolloZhu avatar Nov 27 '16 11:11 ApolloZhu

I am facing the same issue. @lukaszarczynski or Anyone figured out a way to get it working? @Runescaped I am running with openCL backend on mac book with Intel 4000 HD graphics card. So, I am guessing CUDA is not the problem, as I believe CUDA is related to Nvidia Graphics card. Please correct me if I am missing something.

sheikirfanbasha avatar Jan 31 '17 12:01 sheikirfanbasha

When it was last discussed, there was some needed support missing in cltorch https://github.com/jcjohnson/fast-neural-style/issues/45

So unless this has changed, it simply cannot work.

htoyryla avatar Jan 31 '17 13:01 htoyryla