From the middle of 2000’s the neural networks get more and more popular machine learning algorithm. Nowadays the so called deep learning is very popular for different problems like image recognition, speech recognition or business problems. The most important factors in this trend are the better algorithms, parallel computing and the large set of data .
Most of the computers use CPU to run calculation on a given dataset, but in the latest time the GPUs are also used for general calculation along with the graphic processing. They also have impressive performance - power efficiency ratio compared to CPU, which can be excellent for mobile devices as well.
Traditional computer languages don’t handle these devices as a general computing element that is why we need to use another solution. For the GPGPU (general purpose GPU) programming the most popular solution is OpenCL language.
One of the main advantages of the OpenCL is the portability; you can use the same code on every supported device. Among the traditional language Java has the most similar attribution: “write once run everywhere”.
In this paper I combined the two languages; I used Java for the host code and OpenCL for the computing devices. My main goal in this work is to implement a Restricted Boltzmann Machine in OpenCL with the JavaCL API.