Dynamic Neural Networks and Optimal Signal Processing