* rework lightning model for mnist

* sort imports

* add comment to pre-commit-config

* remove returns from test_step because it's bugged

* update experiment configs

* Update README.md
This commit is contained in:
Łukasz Zalewski authored and GitHub committed 2021-03-10 15:33:14 +01:00
1 parent 67d531ab67
commit b1e0bf9717
23 files changed
+480 -320

No files matched your search

+8 -2
View File
@@ -33,7 +33,13 @@ python train.py trainer.gpus=-1 trainer.max_epochs=2 \
print_config=false
echo "TEST 4"
echo "Train with mixed-precision (apex, 2 epochs)"
echo "Train with mixed precision (apex, amp level 01, 2 epochs)"
python train.py trainer.gpus=-1 trainer.max_epochs=2 \
+trainer.amp_backend='apex' +trainer.amp_level='O2' \
+trainer.amp_backend="apex" +trainer.amp_level="O1" +trainer.precision=16 \
print_config=false
echo "TEST 5"
echo "Train with mixed precision (apex, amp level 02, 2 epochs)"
python train.py trainer.gpus=-1 trainer.max_epochs=2 \
+trainer.amp_backend="apex" +trainer.amp_level="O2" +trainer.precision=16 \
print_config=false
+6 -6
View File
@@ -22,7 +22,7 @@ print_config=false
echo "TEST 2"
echo "Overfit to 10 batches (10 epochs)"
python train.py +trainer.overfit_batches=10 \
python train.py trainer.overfit_batches=10 \
trainer.min_epochs=10 trainer.max_epochs=10 \
print_config=false
@@ -34,13 +34,13 @@ print_config=false
echo "TEST 4"
echo "Train on 25% of data (1 epoch)"
python train.py trainer.max_epochs=1 \
+trainer.limit_train_batches=0.25 +trainer.limit_val_batches=0.25 +trainer.limit_test_batches=0.25 \
trainer.limit_train_batches=0.25 trainer.limit_val_batches=0.25 trainer.limit_test_batches=0.25 \
print_config=false
echo "TEST 5"
echo "Train on 15 train batches, 10 val batches, 5 test batches (1 epoch)"
python train.py trainer.max_epochs=1 \
+trainer.limit_train_batches=15 +trainer.limit_val_batches=10 +trainer.limit_test_batches=5 \
trainer.limit_train_batches=15 trainer.limit_val_batches=10 trainer.limit_test_batches=5 \
print_config=false
echo "TEST 6"
@@ -50,18 +50,18 @@ print_config=false
echo "TEST 7"
echo "Run default hydra sweep (executes 4 different combinations in debug mode)"
python train.py -m datamodule.batch_size=32,64 model.lr=0.001,0.003 \
python train.py -m datamodule.batch_size=32,64 optimizer.lr=0.001,0.003 \
debug=True \
print_config=false
echo "TEST 8"
echo "Run with gradient accumulation (1 epoch)"
python train.py trainer.max_epochs=1 +trainer.accumulate_grad_batches=10 \
python train.py trainer.max_epochs=1 trainer.accumulate_grad_batches=10 \
print_config=false
echo "TEST 9"
echo "Run validation loop twice per epoch (2 epochs)"
python train.py trainer.max_epochs=2 +trainer.val_check_interval=0.5 \
python train.py trainer.max_epochs=2 trainer.val_check_interval=0.5 \
print_config=false
echo "TEST 10"