function huberLoss_(labels, predictions, weights, delta, reduction) {
	  if (delta === void 0) {
	    delta = 1.0;
	  }

	  if (reduction === void 0) {
	    reduction = exports.Reduction.SUM_BY_NONZERO_WEIGHTS;
	  }

	  var $labels = convertToTensor(labels, 'labels', 'huberLoss');
	  var $predictions = convertToTensor(predictions, 'predictions', 'huberLoss');
	  var $weights = null;

	  if (weights != null) {
	    $weights = convertToTensor(weights, 'weights', 'huberLoss');
	  }

	  assertShapesMatch($labels.shape, $predictions.shape, 'Error in huberLoss: ');
	  var deltaScalar = scalar(delta);
	  var error = abs$8(sub($predictions, $labels));
	  var quadratic = minimum(error, deltaScalar);
	  var linear = sub(error, quadratic);
	  var losses = add$1(mul(scalar(0.5), square(quadratic)), mul(deltaScalar, linear));
	  return computeWeightedLoss(losses, $weights, reduction);
	}
Computes the huber loss 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 delta Point where huber loss changes from quadratic to linear.
@param reduction Type of reduction to apply to loss. Should be of type
   `Reduction`.

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