This repository holds all the necessary code to run the very-same experiments described in the paper "Enhancing Restricted Boltzmann Machines Reconstructability Through Meta-Heuristic Optimization".
If you use our work to fulfill any of your needs, please cite us:
utils
loader.py
: Utility to load datasets and split them into training, validation and testing sets;objects.py
: Wraps objects instantiation for command line usage;optimizer.py
: Wraps the optimization task into a single method;target.py
: Implements the objective functions to be optimized.
Install all the pre-needed requirements using:
pip install -r requirements.txt
In order to run the experiments, you can use torchvision
to load pre-implemented datasets.
The first step is to pre-train an RBM architecture. To accomplish such a step, one needs to use the following script:
python rbm_training.py -h
Note that -h
invokes the script helper, which assists users in employing the appropriate parameters.
After conducting the training task, one needs to optimize the weights over the validation set. Please, use the following script to accomplish such a procedure:
python rbm_optimization.py -h
Finally, it is now possible to evaluate a model using the testing set. Please, use the following script to accomplish such a procedure:
python rbm_evaluation.py -h
Additionally, one can gather the optimization history files and input them to a script that analyzes its convergence and produces a plot that compares how each optimization technique has performed during its procedure. Please, use such a script as follows:
python analyze_optimization_convergence.py -h