measure_reconstruction_error function

Compute reconstruction-based error metrics