Add dl_setup wiki authored by Federico Izzo's avatar Federico Izzo
#### Step 1 - Repository creation
Inside [DSIP group repo page](https://gitlab.fbk.eu/dsip) click on:
1. New project
2. Create from template
3. Group tab on the top selector
4. Use template: DL_setup
#### Step 2 - Pin requirements
For replicability is important to pin also the version of Python packages inside `requirements.txt`.
TODO: specify where requirements files are located and maybe think of a solution to automate this process.
#### Step 3 - Write RFC
Inside the repo there is a .gitlab/issue_templates directory in which are defined:
* RFC template
* User Story template
* Epic template
Go to the *Issues* section on the sidebar and open a new issue choosing RFC template. Follow the structure defined inside.
#### Step 4 - Change model name
Inside models directory change model_name name directory to a more specific one according to the task you want to accomplish.
#### Step 5 - Write data loading function
Write *data_loading_train* function for train inside *data_processing/data_loading.py* file and modify *DatasetTrain* class according to your needs.
#### Step 6 - Write loss function
Write *compute_loss* function inside *train.py* file.
#### Step 7 - Add optimizer
Add an optimizer in *train* function inside *run.py* file (you can use [configuration file](https://gitlab.fbk.eu/dsip/templates/dl_setup/-/wikis/Configuration-file) to load lr and other hyper-params).
#### Step 8 (Optional) - Add scheduler and early_stopper
Change the value of the scheduler in *train* function inside *run.py* from None to a scheduler you want. If you are not going to use a scheduler leave scheduler to None.
If you want to use [early stopper](https://gitlab.fbk.eu/dsip/templates/dl_setup/-/wikis/Pytorch) you need to write 3 config inside [configuration file](https://gitlab.fbk.eu/dsip/templates/dl_setup/-/wikis/Configuration-file):
* in *environment* section set *use_early_stopper* to true;
* in *earlystopping* section set *patience* to a value you want.
\ No newline at end of file