Question 26/30 fast.ai v3 lecture 10


How to calculate moving average with an exponential decay (with the added benefit of having to keep track of only one value) in PyTorch?

Answer

In PyTorch, you can calculate exponential moving average using torch.lerp

Relevant part of lecture