Implement NME function.

NME is normalized mean error.