Restricted Boltzmann Machine of lattice polymer model
Requirements: Python==2.7.13 mxnet==1.0.0
Example command for training:
python RBM-binary.py -v 6 -n 20 -l 2 -d conf1.txt -w w20 -t 10000 -b 500 -i 20 -m 0.5 -rg enum_rgs.txt -kl enum_states.txt -x 0
Example command for generating:
python RBM-binary.py -v 6 -n 20 -l 2 -d conf1.txt -w w20 -g 1 -k 100 -x 0
scripts/RBM-tor.py supports CPU, CUDA and Apple MPS. For the L16 data, a
validated speed/quality configuration is:
cd scripts
python RBM-tor.py -v 14 -l 3 -d ../data/L16/conf1.txt \
-n 256 -b 10000 -k 1 -r 0.4 -m 0.5 -s 0 -x 0 -c \
--seed 2026 --validation 0.1 -t 20000 -i 1000 -w rbm-l16-n256.weights
Use -n 160 for a faster, lower-memory run. -c/--compile compiles the CD-k
kernel; the first interval includes one-time compilation overhead. Validation
metrics are reported separately and should be used to decide when to stop.