Neural Machine Translation with a Transformer and Keras
This project focuses on neural machine translation (NMT) with attention mechanisms, leveraging TensorFlow for implementation. The notebook begins by installing and importing necessary libraries, including TensorFlow, einops, and matplotlib. The data handling section involves downloading a translation dataset, loading and preprocessing it, and creating TensorFlow datasets for training and validation. Text preprocessing tasks, such as standardization, lowercasing, punctuation splitting, and text vectorization, are performed to prepare the data for model input. The core components include implementing an Encoder class for transforming input sequences into higher-dimensional representations and a CrossAttention layer to perform attention mechanisms during the translation process. The project emphasizes tasks like visualizing tokenization, encoding input sequences, and applying attention mechanisms, providing a comprehensive overview of building an NMT model with attention in TensorFlow.