Imported from https://github.com/ruotianluo/Transformer_Captioning