function meanSquaredError_(labels, predictions, weights, reduction = (0, _lossOpsUtils.Reduction).SUM_BY_NONZERO_WEIGHTS) {
    const $labels = (0, _tensorUtilEnv.convertToTensor)(labels, "labels", "meanSquaredError");
    const $predictions = (0, _tensorUtilEnv.convertToTensor)(predictions, "predictions", "meanSquaredError");
    let $weights = null;
    if (weights != null) $weights = (0, _tensorUtilEnv.convertToTensor)(weights, "weights", "meanSquaredError");
    (0, _util.assertShapesMatch)($labels.shape, $predictions.shape, "Error in meanSquaredError: ");
    const losses = (0, _squaredDifference.squaredDifference)($labels, $predictions);
    return (0, _computeWeightedLoss.computeWeightedLoss)(losses, $weights, reduction);
}
Computes the mean squared error between two tensors.

@param labels The ground truth output tensor, same dimensions as
   'predictions'.
@param predictions The predicted outputs.
@param weights Tensor whose rank is either 0, or the same rank as
   `labels`, and must be broadcastable to `labels` (i.e., all dimensions
   must be either `1`, or the same as the corresponding `losses`
   dimension).
@param reduction Type of reduction to apply to loss. Should be of type
   `Reduction`

@doc {heading: 'Training', subheading: 'Losses', namespace: 'losses'}