If you search for PyTorch and “Image Captioning” you will find a lot of examples:

https://github.com/ritchieng/the-incredible-pytorch 782
https://github.com/ruotianluo/neuraltalk2.pytorch 432
https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/09%20-%20Image%20Captioning 451