错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Machine Translation

  • Chengqing Zong,
  • Yang Zhao,
  • Yanjun Ma

摘要

This chapter focuses on machine translation (MT) using the Transformer model. It introduces the history and applications of MT, detailing the implementation of a Chinese-to-English translation method based on the Transformer framework. The chapter explains the entire process, including data processing (loading, tokenization, converting data to feature form), model construction (embedding layers, encoder, decoder), training configuration (optimizer, loss function, evaluation metrics), and model evaluation. It also provides code examples for each step and analyzes key concepts like positional encoding, label smoothing, and the Adam optimizer with the Noam learning rate decay schedule. The chapter concludes by demonstrating model prediction with sample Chinese texts and provides exercises for further learning.