- Run
pip install -r requirements.txt
from the project directory to install the requirements. - Follow the steps in here to install OpenAI Baselines
- The starting point of the code is
main.py
in the root directory - Code is organised into two packages
utils
andmodels
.models
package consists of all the code files related to feature extractor models and the linear SARSA modelsutils
package consists of all the code files that are common utilities for the model training/evaluation
Feature Extractor Models Implemented: dqn_pretrained, dqn_glorot_normal, dqn_glorot_uniform, dqn_pooling, resnet50_pretrained, resnet50_random_init, resnet101_pretrained, resnet101_random_init, resnet152_pretrained, resnet152_random_init
-
To
train
the model, runpython main.py train -s <save_dir> -e <feature_extractor_model_name> -w <weights_directory|Optional>
This will train the model and save the plots and weights to the specified save directory
-
To
evaluate
the model on the test data, runpython main.py evaluate -s <save_dir> -m <model_weights_path> -e <feature_extractor_model_name> -w <pretrained_weights_path|Optional>
This will evaluate the model and save the gameplay video to save directory and prints the rewards