An Interpretable Neural Network for Parameter Inference