AdamW is an Adam variant used to train neural networks. Its weight-decay approach penalizes larger weights, helping reduce model complexity, limit overfitting, and improve generalization. section 5.2
PyTorch configuration
optimizer = torch.optim.AdamW(model.parameters(), lr=0.0004, weight_decay=0.1). Pass this optimizer to the training function, which calls zero_grad(), backpropagation, and step() for each batch.


