Before running the code to train the model, make sure to download the Paradetox dataset
(only the file paradetox.tsv is needed). Once downloaded, put the file in a folder named data at the root of the project.
You can find a tutorial on how to train the model and how to perform inferences in the folder videos.
To train the model from scratch, simply run main.py without specifying any parameters.
To train the model from an existing checkpoint, run main.py --checkpoint_dir <path> --checkpoint_model <model weights filename> --checkpoint_optimizer <optimizer weights filename>,
with the directory and filenames of the weights.
To do inferences on a trained model, run main.py with the same parameters as above (you don't need to specify the optimizer) and add the argument --inference.
Then, once the weights are loaded, you can write input sentences in your terminal and the model output will be displayed right away.