本文章参考以下博客,如有不懂,可看原博客 参考文章1 参考文章2 参考文章3 整体架构 Transformer其实是一个Seq2Seq模型,左边一个encoder把输入读进去,右边一个decoder得到输出