CudaRBMs Julia package

Some utilities to use RestrictedBoltzmannMachines package with CUDA.


This package is registered. Install with:

import Pkg


This defines two functions, cpu and gpu (similar to Flux.jl), to move RBM and layers to/from the CPU and GPU.

using RestrictedBoltzmannMachines: BinaryRBM
using CudaRBMs: cpu, gpu

rbm = BinaryRBM(randn(5), randn(3), randn(5,3)) # in CPU

# copy to GPU
rbm_cu = gpu(rbm)

# ... do some things with rbm_cu on the GPU (e.g. training, sampling)

# copy back to CPU
rbm = cpu(rbm_cuda)