An implementation of SGLD (and variants) with two key purposes in mind:
- Easy to cherry-pick into your own research code for baseline evaluation.
- Clean enough for dirty prototyping with fancy/ad-hoc extensions.
Use the environment.yml to add common dependencies to your working Python environment.
conda env create -n <env_name>
Add the slgd
package to PYTHONPATH for imports.
export PYTHONPATH="$(pwd)/src:${PYTHONPATH}"
See viz_sgld.ipynb.
Full examples which are easy to modify.
-
SGLD: A full pipeline of using SGLD is provided in train_sgld.py
-
cSGLD: A full pipeline of using SGLD + cyclical step size schedule (cSGLD) is provided in train_csgld.py
MIT