Train and sample Restricted Boltzmann machines in Julia.
This package is registered. Install with:
import Pkg
Pkg.add("RestrictedBoltzmannMachines")
This package does not export any symbols. Since the name RestrictedBoltzmannMachines
is long, it can be imported as:
import RestrictedBoltzmannMachines as RBMs
We define two functions, cpu
and gpu
(similar to Flux.jl), to move RBM
to/from the CPU and GPU.
import CUDA # if you want to use the GPU, need to import this
using RestrictedBoltzmannMachines: BinaryRBM, 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)
Train and sample centered Restricted Boltzmann machines in Julia. See [Melchior et al] for the definition of centered. Consider an RBM with binary units. Then the centered variant has energy defined by:
with offset parameters
Train and sample a standardized Restricted Boltzmann machine in Julia. The energy is given by:
with some offset parameters
Adversarially constrained RBMs:
Stacked tempering:
- Montavon, Grégoire, and Klaus-Robert Müller. "Deep Boltzmann machines and the centering trick." Neural networks: tricks of the trade. Springer, Berlin, Heidelberg, 2012. 621-637.
- Melchior, Jan, Asja Fischer, and Laurenz Wiskott. "How to center deep Boltzmann machines." The Journal of Machine Learning Research 17.1 (2016): 3387-3447.
If you use this package in a publication, please cite:
- Jorge Fernandez-de-Cossio-Diaz, Simona Cocco, and Remi Monasson. "Disentangling representations in Restricted Boltzmann Machines without adversaries." Physical Review X 13, 021003 (2023).
Or you can use the included CITATION.bib.