Domain Knowledge Guided Testing and Training of Neural Networks