benoitsteiner / tensorflow-opencl

OpenCL support for TensorFlow
Apache License 2.0
472 stars 86 forks source link

Getting Nan everywhere #74

Open SavvaI opened 7 years ago

SavvaI commented 7 years ago

Hello, I literally followed this guide from end to end https://www.codeplay.com/portal/03-30-17-setting-up-tensorflow-with-opencl-using-sycl , and it kinda worked, (i tested multiplying small matrices) but when i run any of tensorflow examples ( https://github.com/aymericdamien/TensorFlow-Examples ) i am getting Nan in training loss everywhere, also batch computation time is very long. I have AMD Radeon R9 290, ubuntu 14.04

rodburns commented 7 years ago

The latest guide docs are here https://www.codeplay.com/products/computesuite/computecpp/guides/how-to-setup-tensorflow-with-computecpp and you would be better trying the branch at https://github.com/lukeiwanski/tensorflow.git which has the latest code base.

SavvaI commented 7 years ago

I tried that guide and it didn't help. Executing mnist example from the guide works, but i get 263ms batch time comparing with 157ms when working on CPU

rodburns commented 7 years ago

That is not unexpected at the moment, we are adding vectorization which optimizes the implementation. This is being prepared as a pull request and will be available soon.

SavvaI commented 7 years ago

Ok. Thank you for reply.