Our code is based on fairseq: https://github.com/pytorch/fairseq.
1. If you want to implement our EISL loss, please first install fairseq.
2. Move the EISLloss.py into fairseq/fairseq/criterions/EISLloss.py
3. You can use our EISLloss on text generation task (e.g., NMT: https://github.com/pytorch/fairseq/tree/main/examples/translation ) by set "--criterion eislloss".