There does not exist a function like tf.sequence_mask() in pytorch. It is not easy to process variable length sequence. In this tutorial, we will introduce you how to create a function like tf.sequence_mask().
torch.optim.lr_scheduler.ExponentialLR() is often used to change the learning rate in pytorch. In this tutorial, we will use some examples to show you how to use it correctly.