An OpenCL implementation of Deep Belief Networks and Restricted Boltzmann Machines