Problem-specific neural networks for detecting structural damage