Filters are fundamental components widely used in Electric Information and Control Engineering. Filters based on rectangular waveguide have good performance with low loss, high operation frequencies and high power. But the design and optimizing is a rather complex job. In this paper, a neural network is introduced to optimize two parameters in a waveguide band-pass filter. The result shows that after training, the neural network can predict the S parameter well and make the process of optimizing easier.