/external/tensorflow/tensorflow/python/kernel_tests/ |
D | losses_test.py | 35 from tensorflow.python.ops.losses import losses 36 from tensorflow.python.ops.losses import util 52 losses.absolute_difference( 56 loss = losses.absolute_difference(self._predictions, self._predictions) 61 loss = losses.absolute_difference(self._labels, self._predictions) 67 loss = losses.absolute_difference(self._labels, self._predictions, weights) 73 loss = losses.absolute_difference(self._labels, self._predictions, 80 loss = losses.absolute_difference(self._labels, self._predictions, weights) 86 loss = losses.absolute_difference(self._labels, self._predictions, weights) 92 loss = losses.absolute_difference(self._labels, self._predictions, weights) [all …]
|
/external/tensorflow/tensorflow/python/keras/ |
D | losses_test.py | 33 from tensorflow.python.keras import losses 40 losses.mean_squared_error, losses.mean_absolute_error, 41 losses.mean_absolute_percentage_error, 42 losses.mean_squared_logarithmic_error, losses.squared_hinge, losses.hinge, 43 losses.categorical_crossentropy, losses.binary_crossentropy, 44 losses.kl_divergence, losses.poisson, 45 losses.cosine_similarity, losses.log_cosh, losses.categorical_hinge 73 objective_output = losses.sparse_categorical_crossentropy(y_a, y_b) 78 objective_output = losses.sparse_categorical_crossentropy(y_a, y_b) 86 output_from_logit = losses.categorical_crossentropy( [all …]
|
/external/tensorflow/tensorflow/python/ops/losses/ |
D | losses_impl.py | 31 from tensorflow.python.ops.losses import util 76 def _safe_mean(losses, num_present): argument 87 total_loss = math_ops.reduce_sum(losses) 91 def _num_present(losses, weights, per_batch=False): argument 116 return _num_elements(losses) 117 with ops.name_scope(None, "num_present", (losses, weights)) as scope: 123 present = weights_broadcast_ops.broadcast_weights(present, losses) 133 def _num_elements(losses): argument 135 with ops.name_scope(None, "num_elements", values=[losses]) as scope: 136 return math_ops.cast(array_ops.size(losses, name=scope), dtype=losses.dtype) [all …]
|
D | util.py | 123 def scale_losses_by_sample_weight(losses, sample_weight): argument 138 losses = math_ops.cast(losses, dtypes.float32) 142 losses, _, sample_weight = squeeze_or_expand_dimensions( 143 losses, None, sample_weight) 144 return math_ops.multiply(losses, sample_weight) 230 losses = get_regularization_losses(scope) 231 if losses: 232 return math_ops.add_n(losses, name=name) 263 losses = get_losses(scope=scope) 265 losses += get_regularization_losses(scope=scope) [all …]
|
/external/tensorflow/tensorflow/python/keras/utils/ |
D | losses_utils.py | 235 def _safe_mean(losses, num_present): argument 246 total_loss = math_ops.reduce_sum(losses) 250 def _num_elements(losses): argument 253 return math_ops.cast(array_ops.size(losses, name=scope), dtype=losses.dtype) 268 def compute_weighted_loss(losses, argument 302 if not isinstance(losses, 304 losses = ops.convert_to_tensor_v2_with_dispatch(losses) 305 input_dtype = losses.dtype 312 losses = math_ops.cast(losses, 'float32') 315 …losses, _, sample_weight = squeeze_or_expand_dimensions( # pylint: disable=unbalanced-tuple-unpac… [all …]
|
/external/tensorflow/tensorflow/tools/api/golden/v1/ |
D | tensorflow.losses.pbtxt | 1 path: "tensorflow.losses" 9 …eduction\'], varargs=None, keywords=None, defaults=[\'1.0\', \'None\', \'losses\', \'weighted_sum_… 13 …argspec: "args=[\'loss\', \'loss_collection\'], varargs=None, keywords=None, defaults=[\'losses\']… 17 …args=[\'losses\', \'weights\', \'scope\', \'loss_collection\', \'reduction\'], varargs=None, keywo… 21 …], varargs=None, keywords=None, defaults=[\'None\', \'1.0\', \'None\', \'losses\', \'weighted_sum_… 25 …s=[\'scope\', \'loss_collection\'], varargs=None, keywords=None, defaults=[\'None\', \'losses\'], " 41 …eduction\'], varargs=None, keywords=None, defaults=[\'1.0\', \'None\', \'losses\', \'weighted_sum_… 45 …'], varargs=None, keywords=None, defaults=[\'1.0\', \'1.0\', \'None\', \'losses\', \'weighted_sum_… 49 …, varargs=None, keywords=None, defaults=[\'1.0\', \'1e-07\', \'None\', \'losses\', \'weighted_sum_… 53 …e\', \'loss_collection\'], varargs=None, keywords=None, defaults=[\'1.0\', \'None\', \'losses\'], " [all …]
|
D | tensorflow.keras.losses.-mean-absolute-percentage-error.pbtxt | 1 path: "tensorflow.keras.losses.MeanAbsolutePercentageError" 3 is_instance: "<class \'tensorflow.python.keras.losses.MeanAbsolutePercentageError\'>" 4 is_instance: "<class \'tensorflow.python.keras.losses.LossFunctionWrapper\'>" 5 is_instance: "<class \'tensorflow.python.keras.losses.Loss\'>"
|
D | tensorflow.keras.losses.-binary-crossentropy.pbtxt | 1 path: "tensorflow.keras.losses.BinaryCrossentropy" 3 is_instance: "<class \'tensorflow.python.keras.losses.BinaryCrossentropy\'>" 4 is_instance: "<class \'tensorflow.python.keras.losses.LossFunctionWrapper\'>" 5 is_instance: "<class \'tensorflow.python.keras.losses.Loss\'>"
|
D | tensorflow.keras.losses.-hinge.pbtxt | 1 path: "tensorflow.keras.losses.Hinge" 3 is_instance: "<class \'tensorflow.python.keras.losses.Hinge\'>" 4 is_instance: "<class \'tensorflow.python.keras.losses.LossFunctionWrapper\'>" 5 is_instance: "<class \'tensorflow.python.keras.losses.Loss\'>"
|
/external/tensorflow/tensorflow/python/keras/saving/ |
D | losses_serialization_test.py | 30 from tensorflow.python.keras import losses 45 class MyMeanAbsoluteError(losses.LossFunctionWrapper): 71 dict(testcase_name='built_in_fn', value=losses.mae), 72 dict(testcase_name='built_in_class', value=losses.MeanAbsoluteError()), 76 dict(testcase_name='list_of_built_in_fns', value=[losses.mae, losses.mae]), 79 value=[losses.MeanAbsoluteError(), 80 losses.MeanAbsoluteError()]), 95 'output': losses.mae, 96 'output_1': losses.mae, 101 'output': losses.MeanAbsoluteError(), [all …]
|
/external/tensorflow/tensorflow/python/ops/ |
D | nn_xent_test.py | 54 losses = np.array(self._SigmoidCrossEntropyWithLogits(x, y)).reshape(*sizes) 55 return logits, targets, losses 69 logits, targets, losses = self._Inputs(dtype=dtype) 72 np_loss = np.array(losses).astype(np.float32) 80 logits, targets, losses = self._Inputs(dtype=dtype, sizes=[2, 2, 2]) 83 np_loss = np.array(losses).astype(np.float32) 133 losses = np.array(self._WeightedCrossEntropy(x, y, q)).reshape(*sizes) 134 return logits, targets, q, losses 147 logits, targets, pos_weight, losses = self._Inputs(dtype=dtypes.float32) 150 np_loss = np.array(losses).astype(np.float32) [all …]
|
/external/tensorflow/tensorflow/python/tpu/ |
D | tpu_optimizer.py | 24 from tensorflow.python.ops.losses import losses 38 reduction=losses.Reduction.MEAN, 55 if reduction not in (losses.Reduction.SUM, losses.Reduction.MEAN): 154 if num_shards > 1 and self._reduction == losses.Reduction.MEAN:
|
/external/tensorflow/tensorflow/tools/api/golden/v2/ |
D | tensorflow.losses.-hinge.pbtxt | 1 path: "tensorflow.losses.Hinge" 3 is_instance: "<class \'tensorflow.python.keras.losses.Hinge\'>" 4 is_instance: "<class \'tensorflow.python.keras.losses.LossFunctionWrapper\'>" 5 is_instance: "<class \'tensorflow.python.keras.losses.Loss\'>"
|
D | tensorflow.losses.-squared-hinge.pbtxt | 1 path: "tensorflow.losses.SquaredHinge" 3 is_instance: "<class \'tensorflow.python.keras.losses.SquaredHinge\'>" 4 is_instance: "<class \'tensorflow.python.keras.losses.LossFunctionWrapper\'>" 5 is_instance: "<class \'tensorflow.python.keras.losses.Loss\'>"
|
D | tensorflow.losses.-log-cosh.pbtxt | 1 path: "tensorflow.losses.LogCosh" 3 is_instance: "<class \'tensorflow.python.keras.losses.LogCosh\'>" 4 is_instance: "<class \'tensorflow.python.keras.losses.LossFunctionWrapper\'>" 5 is_instance: "<class \'tensorflow.python.keras.losses.Loss\'>"
|
D | tensorflow.losses.-categorical-hinge.pbtxt | 1 path: "tensorflow.losses.CategoricalHinge" 3 is_instance: "<class \'tensorflow.python.keras.losses.CategoricalHinge\'>" 4 is_instance: "<class \'tensorflow.python.keras.losses.LossFunctionWrapper\'>" 5 is_instance: "<class \'tensorflow.python.keras.losses.Loss\'>"
|
D | tensorflow.losses.-mean-squared-logarithmic-error.pbtxt | 1 path: "tensorflow.losses.MeanSquaredLogarithmicError" 3 is_instance: "<class \'tensorflow.python.keras.losses.MeanSquaredLogarithmicError\'>" 4 is_instance: "<class \'tensorflow.python.keras.losses.LossFunctionWrapper\'>" 5 is_instance: "<class \'tensorflow.python.keras.losses.Loss\'>"
|
D | tensorflow.losses.-mean-absolute-error.pbtxt | 1 path: "tensorflow.losses.MeanAbsoluteError" 3 is_instance: "<class \'tensorflow.python.keras.losses.MeanAbsoluteError\'>" 4 is_instance: "<class \'tensorflow.python.keras.losses.LossFunctionWrapper\'>" 5 is_instance: "<class \'tensorflow.python.keras.losses.Loss\'>"
|
D | tensorflow.losses.-mean-absolute-percentage-error.pbtxt | 1 path: "tensorflow.losses.MeanAbsolutePercentageError" 3 is_instance: "<class \'tensorflow.python.keras.losses.MeanAbsolutePercentageError\'>" 4 is_instance: "<class \'tensorflow.python.keras.losses.LossFunctionWrapper\'>" 5 is_instance: "<class \'tensorflow.python.keras.losses.Loss\'>"
|
D | tensorflow.losses.-mean-squared-error.pbtxt | 1 path: "tensorflow.losses.MeanSquaredError" 3 is_instance: "<class \'tensorflow.python.keras.losses.MeanSquaredError\'>" 4 is_instance: "<class \'tensorflow.python.keras.losses.LossFunctionWrapper\'>" 5 is_instance: "<class \'tensorflow.python.keras.losses.Loss\'>"
|
D | tensorflow.losses.-k-l-divergence.pbtxt | 1 path: "tensorflow.losses.KLDivergence" 3 is_instance: "<class \'tensorflow.python.keras.losses.KLDivergence\'>" 4 is_instance: "<class \'tensorflow.python.keras.losses.LossFunctionWrapper\'>" 5 is_instance: "<class \'tensorflow.python.keras.losses.Loss\'>"
|
D | tensorflow.losses.-poisson.pbtxt | 1 path: "tensorflow.losses.Poisson" 3 is_instance: "<class \'tensorflow.python.keras.losses.Poisson\'>" 4 is_instance: "<class \'tensorflow.python.keras.losses.LossFunctionWrapper\'>" 5 is_instance: "<class \'tensorflow.python.keras.losses.Loss\'>"
|
D | tensorflow.keras.losses.-hinge.pbtxt | 1 path: "tensorflow.keras.losses.Hinge" 3 is_instance: "<class \'tensorflow.python.keras.losses.Hinge\'>" 4 is_instance: "<class \'tensorflow.python.keras.losses.LossFunctionWrapper\'>" 5 is_instance: "<class \'tensorflow.python.keras.losses.Loss\'>"
|
D | tensorflow.losses.-huber.pbtxt | 1 path: "tensorflow.losses.Huber" 3 is_instance: "<class \'tensorflow.python.keras.losses.Huber\'>" 4 is_instance: "<class \'tensorflow.python.keras.losses.LossFunctionWrapper\'>" 5 is_instance: "<class \'tensorflow.python.keras.losses.Loss\'>"
|
D | tensorflow.losses.-binary-crossentropy.pbtxt | 1 path: "tensorflow.losses.BinaryCrossentropy" 3 is_instance: "<class \'tensorflow.python.keras.losses.BinaryCrossentropy\'>" 4 is_instance: "<class \'tensorflow.python.keras.losses.LossFunctionWrapper\'>" 5 is_instance: "<class \'tensorflow.python.keras.losses.Loss\'>"
|