Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

RBM-polymer

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

Optimized PyTorch training (L16)

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.

About

Restricted Boltzmann Machine of lattice polymer model

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages