Coercing machine learning to output physically accurate results