Robust and efficient representations of dynamic stimuli in hierarchical neural networks via temporal smoothing