An open API service indexing awesome lists of open source software.

https://github.com/nightmachinery/random-shuffle-sgd

An implementation of the paper "How Good is SGD with Random Shuffling?"
https://github.com/nightmachinery/random-shuffle-sgd

Last synced: 3 months ago
JSON representation

An implementation of the paper "How Good is SGD with Random Shuffling?"

Awesome Lists containing this project

README

          

#+TITLE: random-shuffle-SGD

* Algorithms
#+ATTR_HTML: :width 900
[[file:readme.org_imgs/20230712_060555_UOdC4A.png]]

* Experiments
** One Seed
#+begin_example zsh
modes=(
shuffle_once
cyclic
shuffle_all
shuffle_all_replacement
)

batch_sizes=(64 1)

for bs in "${batch_sizes[@]}" ; do
for mode in "${modes[@]}" ; do
echo "mode=${mode}, batch_size=${bs}"

python rsgd.py --batch-size "${bs}" --log-interval 10000 --epochs 10 --mode "$mode" --save-model auto --prefix-path "./results/batch_size_${bs}/"
done
done
#+end_example

** Different Seeds
#+begin_example zsh
seeds=(
1
2
3
4
5
)

modes=(
shuffle_once
cyclic
shuffle_all
shuffle_all_replacement
)

batch_sizes=(
512
# 64
# 1
)

for bs in "${batch_sizes[@]}" ; do
for seed in "${seeds[@]}" ; do
for mode in "${modes[@]}" ; do
echo "mode=${mode}, batch_size=${bs}"

python rsgd.py --seed "$seed" --batch-size "${bs}" --lr 0.1 --log-interval 10000 --epochs 10 --mode "$mode" --save-model auto --prefix-path "./results/batch_size_${bs}/seed_${seed}/"
done
done
done
#+end_example

#+begin_example zsh
python ./seed_averager.py | tee /dev/tty > results_avg_summary.txt
#+end_example

* Results
- [[./results.org]]