Before running the script, make sure the requirements are met by installing from requirements.txt using
pip install -r requirements.txt
-
Configure the config.gin file in /configs
-
Use one of the following commands to perform training/evaluation/visualization. Make sure training is performed before evaluation or visualization. The experiment name which is used for training should be used for evaluation and visualization.
Note: Information on using checkpoints for evaluation and visualization can be found in the config file.
python main.py --train True --dir_name "Experiment-name"
python main.py --eval True --dir_name "Experiment-name"
python main.py --visualize True --dir_name "Experiment-name"
- The files related to the experiment can be found under /experiments/Experiment-name/version_0
dl-lab-21w-team11
|-- architecture/
| |-- base_model.py
| |-- models.py
|-- configs/
| |-- config.gin
|-- datasets/
|-- experiments/
|-- input_pipeline/
| |-- data_loader.py
|-- utils/
| |-- utils_misc.py
| |-- utils_params.py
|-- .gitignore
|-- README.md
|-- requirements.txt
|-- har_batch.sh
|-- main.py
|-- train.py
|-- wandb-tune.py
- Hyperparameter Tuning:
Best Parameters for each model based on hyperparameter tuning
| Hyperparameters | Simple LSTM | Bidirectional LSTM | MaxPool LSTM | MaxPool Bidirectional LSTM |
|---|---|---|---|---|
| Batch size | 128 | 64 | 32 | 64 |
| Window size | 200 | 256 | 200 | 256 |
| Window shift | 125 | 128 | 125 | 128 |
| Dropout rate | 0.3 | 0.16 | 0.3 | 0.1 |
| Learning rate | 0.004 | 0.003 | 0.001 | 0.003 |
| Regularization rate | 0.001 | 0.001 | 0.00045 | 0.001 |
| Number of LSTM layers | 2 | 2 | 3 | 3 |
| Hidden size | 26 | 60 | 42 | 50 |
| Epochs | 49 | 52 | 25 | 5 |
-
Evaluation Accuracy:
Model Evaluation accuracy Simple LSTM 92.7 Bidirectional LSTM 93.79 MaxPool LSTM 93.86 MaxPool Bidirectional LSTM 94.3 -
Confusion Matrix: Maxpool Bidirectional LSTM

