Exponential moving average in a sliding window.
Input tensor.
Sliding window width.
Filtered array of the same length.