Update README.md

This commit is contained in:
hobogalaxy authored and GitHub committed 2020-11-29 16:12:14 +01:00
1 parent ad0344d0a1
commit 5758e29654
1 file changed
+16 -16
+16 -16
View File
@@ -109,33 +109,33 @@ Example run configuration:
```yaml ```yaml
MNIST_CLASSIFIER_V1: MNIST_CLASSIFIER_V1:
trainer: <- lightning 'Trainer' parameters (all except 'max_epochs' are optional) trainer: <- lightning 'Trainer' parameters (all except 'max_epochs' are optional)
max_epochs: 5 <- number of training epochs max_epochs: 5
gradient_clip_val: 0.5 <- gradient clipping value (helps with exploding gradient issues) gradient_clip_val: 0.5
accumulate_grad_batches: 3 <- optimise after accumulating gradient from 3 batches accumulate_grad_batches: 3
limit_train_batches: 1.0 <- 0.6 would mean to train only on 60% of training data limit_train_batches: 1.0
model: <- all of the parameters here will be passed to 'LitModel' in 'hparams' dictionary model: <- all of the parameters here will be passed to 'LitModel' in 'hparams' dictionary
model_folder: "simple_mnist_classifier" <- name of folder from which 'lightning_module.py' (with 'LitMdodel' class) will be loaded model_folder: "simple_mnist_classifier" <- name of folder from which 'lightning_module.py' (with 'LitMdodel' class) will be loaded
lr: 0.001 <- learning rate lr: 0.001
weight_decay: 0.000001 <- L2 normalization set in optimizer weight_decay: 0.000001
input_size: 784 # img size for mnist digits is 1*28*28 input_size: 784
output_size: 10 # there are 10 digit classes output_size: 10
lin1_size: 256 lin1_size: 256
lin2_size: 256 lin2_size: 256
lin3_size: 128 lin3_size: 128
dataset: <- all of the parameters here will be passed to 'DataModule' in 'hparams' dictionary dataset: <- all of the parameters here will be passed to 'DataModule' in 'hparams' dictionary
datamodule_folder: "mnist_digits_datamodule" <- name of folder from which 'datamodule.py' (with 'DataModule' class) will be loaded datamodule_folder: "mnist_digits_datamodule" <- name of folder from which 'datamodule.py' (with 'DataModule' class) will be loaded
batch_size: 256 <- batch size batch_size: 256
train_val_split_ratio: 0.9 <- split ratio between training and validation set train_val_split_ratio: 0.9
num_workers: 1 <- how many subprocesses to use for data loading num_workers: 1
pin_memory: False <- if True, the data loader will copy Tensors into CUDA pinned memory before returning them. pin_memory: False
``` ```
## Workflow ## Workflow
1. Add your model to 'project/models' folder<br> 1. Add your model to `project/models` folder<br>
(you need to create folder with 'lightning_module.py' file containing 'LitModel' class) (you need to create folder with `lightning_module.py` file containing `LitModel` class)
2. Add your datamodule to 'project/data_modules' folder<br> 2. Add your datamodule to `project/data_modules` folder<br>
(you need to create folder with 'datamodule.py' file containig 'DataModule' class) (you need to create folder with `datamodule.py` file containig `DataModule` class)
3. Add your run config to [run_configs.yaml](project/run_configs.yaml) (specify there folders containing your model and datamodule) 3. Add your run config to [run_configs.yaml](project/run_configs.yaml) (specify there folders containing your model and datamodule)
3. Configure [project_config.yaml](project/project_config.yaml) 3. Configure [project_config.yaml](project/project_config.yaml)
4. Run training:<br> 4. Run training:<br>