python -m venv .
cd scripts
activate
and on linux
source bin/activate
pip install -r requirements.txt
and install pytorch directly from source
pip install torch==1.6.0+cu101 torchvision==0.7.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html
mkdir model_checkpoints
and point the config.ini file to this folder:
checkpoint_dir = model_checkpoints/
First stage of model should be run for 10 epochs, batch size 6. Check the config.ini file to verify this:
epochs = 10
batch_size = 6
stage = 1
Then run the train.py python file to start training using the following command:
python train.py --config_file config.ini --section DEFAULT
Second stage of model should be run for 15 epochs, batch size 3. Change the config.ini file to reflect this:
epochs = 15
batch_size = 3
stage = 2
model_stage1_file = C2F_stage1_epoch9.pt
Then run the train.py python file to start training again using the following command:
python train.py --config_file config.ini --section DEFAULT
To test the saved model, point the config.ini file to the final saved model:
model_test_file = C2F_stage2_epoch14.pt
Then run the test.py python file to run test phase using the following command:
python test.py --config_file config.ini --section DEFAULT
Generated summaries will be the GPT_C2F_output.json file in the output folder specified by config.ini file:
test_output_dir = output/
Repeat steps 5-7 but replace train.py and test.py with train_stretch.py and test_stretch.py