Home | History | Annotate | Download | only in losses

Lines Matching refs:math_ops

25 from tensorflow.python.ops import math_ops
92 math_ops.greater(denominator, 0),
93 math_ops.div(numerator, array_ops.where(
94 math_ops.equal(denominator, 0),
111 total_loss = math_ops.reduce_sum(losses)
138 weights = math_ops.to_float(weights)
140 math_ops.equal(weights, 0.0),
145 return math_ops.reduce_sum(
146 present, axis=math_ops.range(1, array_ops.rank(present)),
148 return math_ops.reduce_sum(present, name=scope)
154 return math_ops.cast(array_ops.size(losses, name=scope), dtype=losses.dtype)
194 losses = math_ops.to_float(losses)
195 weights = math_ops.to_float(weights)
196 weighted_losses = math_ops.multiply(losses, weights)
200 loss = math_ops.reduce_sum(weighted_losses)
204 math_ops.reduce_sum(array_ops.ones_like(losses) * weights))
212 loss = math_ops.cast(loss, input_dtype)
257 predictions = math_ops.to_float(predictions)
258 labels = math_ops.to_float(labels)
260 losses = math_ops.abs(math_ops.subtract(predictions, labels))
309 predictions = math_ops.to_float(predictions)
310 labels = math_ops.to_float(labels)
313 radial_diffs = math_ops.multiply(predictions, labels)
314 losses = 1 - math_ops.reduce_sum(radial_diffs, axis=(axis,), keepdims=True)
349 logits = math_ops.to_float(logits)
350 labels = math_ops.to_float(labels)
354 labels = math_ops.subtract(2 * labels, all_ones)
356 math_ops.subtract(all_ones, math_ops.multiply(labels, logits)))
413 predictions = math_ops.to_float(predictions)
414 labels = math_ops.to_float(labels)
416 error = math_ops.subtract(predictions, labels)
417 abs_error = math_ops.abs(error)
418 quadratic = math_ops.minimum(abs_error, delta)
470 predictions = math_ops.to_float(predictions)
471 labels = math_ops.to_float(labels)
473 losses = -math_ops.multiply(
475 math_ops.log(predictions + epsilon)) - math_ops.multiply(
476 (1 - labels), math_ops.log(1 - predictions + epsilon))
533 weights = math_ops.to_float(weights)
534 labels = math_ops.to_float(labels)
537 predictions = math_ops.to_float(predictions)
540 diffs = math_ops.subtract(predictions, labels)
542 reduction_indices = math_ops.range(1, array_ops.rank(diffs))
544 sum_squares_diff_per_batch = math_ops.reduce_sum(
545 math_ops.square(diffs), reduction_indices=reduction_indices,
552 sum_diff = math_ops.reduce_sum(
555 math_ops.square(sum_diff),
556 math_ops.multiply(num_present_per_batch, num_present_per_batch - 1))
558 weighted_losses = math_ops.multiply(term1 - term2, weights)
559 loss = math_ops.reduce_sum(weighted_losses)
562 math_ops.reduce_sum(num_present_per_batch) > 0,
610 predictions = math_ops.to_float(predictions)
611 labels = math_ops.to_float(labels)
613 losses = math_ops.squared_difference(predictions, labels)
663 multi_class_labels = math_ops.cast(multi_class_labels, logits.dtype)
719 onehot_labels = math_ops.cast(onehot_labels, logits.dtype)
723 num_classes = math_ops.cast(
782 math_ops.equal(1, rank_diff),