'Compute the reconstruction loss over the test set.
Parameters
data : array_like
Data to reconstruct.
data_ref : array_like
Reference data.
Returns
float: Mean error.'

def score(self, data, data_ref, graph=None):

    g = (graph if (graph is not None) else self.tf_graph)
    with g.as_default():
        with tf.Session() as self.tf_session:
            self.tf_saver.restore(self.tf_session, self.model_path)
            feed = {self.input_data: data, self.input_labels: data_ref, self.keep_prob: 1}
            return self.cost.eval(feed)
