'Updates the internal evaluation result.
Parameters
labels : list of `NDArray`
The labels of the data.
preds : list of `NDArray`
Predicted values.'

def update(self, labels, preds):

    check_label_shapes(labels, preds)
    for (label, pred) in zip(labels, preds):
        label = label.asnumpy()
        pred = pred.asnumpy()
        if (len(label.shape) == 1):
            label = label.reshape(label.shape[0], 1)
        self.sum_metric += ((label - pred) ** 2.0).mean()
        self.num_inst += 1
