You don’t need to initialize the model and optimizer and should use torch.cuda.amp.autocast as well as torch.cuda.amp.GradScaler as described here 13.



 RylanSchaeffer:

Does torch.cuda.amp have anything similar I need to keep in mind?


No, right now native amp is similar to apex.amp O1. We are experimenting with an O2-style mode, which is still WIP.