/external/tensorflow/tensorflow/contrib/losses/ |
__init__.py | 16 """Ops for building neural network losses. 18 See @{$python/contrib.losses}. 25 from tensorflow.contrib.losses.python import metric_learning 27 from tensorflow.contrib.losses.python.losses import *
|
/external/tensorflow/tensorflow/contrib/losses/python/losses/ |
__init__.py | 15 """Ops for building neural network losses. 17 See @{$python/contrib.losses}. 25 from tensorflow.contrib.losses.python.losses.loss_ops import *
|
loss_ops.py | 17 Note: All the losses are added to the `GraphKeys.LOSSES` collection. 42 def _scale_losses(losses, weights): 46 losses: A `Tensor` of size [batch_size, d1, ... dN]. 48 The `losses` are reduced (tf.reduce_sum) until its dimension matches 49 that of `weights` at which point the reduced `losses` are element-wise 52 `weights` to be the same size as `losses`, performing an element-wise 57 `losses`. 59 # First, compute the sum of the losses over all elements: 61 reduction_indices = list(range(start_index, losses.get_shape().ndims) [all...] |
/external/tensorflow/tensorflow/contrib/keras/api/keras/losses/ |
__init__.py | 22 from tensorflow.python.keras._impl.keras.losses import binary_crossentropy 23 from tensorflow.python.keras._impl.keras.losses import categorical_crossentropy 24 from tensorflow.python.keras._impl.keras.losses import categorical_hinge 25 from tensorflow.python.keras._impl.keras.losses import cosine_proximity 26 from tensorflow.python.keras._impl.keras.losses import hinge 27 from tensorflow.python.keras._impl.keras.losses import kullback_leibler_divergence 28 from tensorflow.python.keras._impl.keras.losses import logcosh 29 from tensorflow.python.keras._impl.keras.losses import mean_absolute_error 30 from tensorflow.python.keras._impl.keras.losses import mean_absolute_percentage_error 31 from tensorflow.python.keras._impl.keras.losses import mean_squared_erro [all...] |
/external/tensorflow/tensorflow/python/keras/losses/ |
__init__.py | 22 from tensorflow.python.keras._impl.keras.losses import binary_crossentropy 23 from tensorflow.python.keras._impl.keras.losses import categorical_crossentropy 24 from tensorflow.python.keras._impl.keras.losses import categorical_hinge 25 from tensorflow.python.keras._impl.keras.losses import cosine_proximity 26 from tensorflow.python.keras._impl.keras.losses import hinge 27 from tensorflow.python.keras._impl.keras.losses import kullback_leibler_divergence 28 from tensorflow.python.keras._impl.keras.losses import logcosh 29 from tensorflow.python.keras._impl.keras.losses import mean_absolute_error 30 from tensorflow.python.keras._impl.keras.losses import mean_absolute_percentage_error 31 from tensorflow.python.keras._impl.keras.losses import mean_squared_erro [all...] |
/external/tensorflow/tensorflow/contrib/gan/python/losses/ |
__init__.py | 15 """TFGAN losses and penalties. 17 Losses can be used with individual arguments or with GANModel tuples. 24 # Collapse losses into a single namespace. 25 from tensorflow.contrib.gan.python.losses.python import losses_wargs as wargs 26 from tensorflow.contrib.gan.python.losses.python import tuple_losses 29 from tensorflow.contrib.gan.python.losses.python.tuple_losses import *
|
/external/tensorflow/tensorflow/python/ops/losses/ |
losses.py | 17 Note: All the losses are added to the `GraphKeys.LOSSES` collection by default. 40 from tensorflow.python.ops.losses import util 42 from tensorflow.python.ops.losses.losses_impl import * 43 from tensorflow.python.ops.losses.util import *
|
util.py | 36 @tf_export("losses.add_loss") 37 def add_loss(loss, loss_collection=ops.GraphKeys.LOSSES): 38 """Adds a externally defined loss to the collection of losses. 48 @tf_export("losses.get_losses") 49 def get_losses(scope=None, loss_collection=ops.GraphKeys.LOSSES): 50 """Gets the list of losses from the loss_collection. 53 scope: An optional scope name for filtering the losses to return. 54 loss_collection: Optional losses collection. 62 @tf_export("losses.get_regularization_losses") 64 """Gets the list of regularization losses [all...] |
losses_impl.py | 29 from tensorflow.python.ops.losses import util 34 @tf_export("losses.Reduction") 39 `NONE`: Un-reduced weighted losses with the same shape as input. 40 `SUM`: Scalar sum of weighted losses. 42 `SUM_OVER_BATCH_SIZE`: Scalar `SUM` divided by number of elements in losses. 100 def _safe_mean(losses, num_present): 101 """Computes a safe mean of the losses. 104 losses: `Tensor` whose elements contain individual loss measurements. 105 num_present: The number of measurable elements in `losses`. 108 A scalar representing the mean of `losses`. If `num_present` is zero [all...] |
/external/tensorflow/tensorflow/python/keras/_impl/keras/ |
losses_test.py | 34 ALL_LOSSES = [keras.losses.mean_squared_error, 35 keras.losses.mean_absolute_error, 36 keras.losses.mean_absolute_percentage_error, 37 keras.losses.mean_squared_logarithmic_error, 38 keras.losses.squared_hinge, 39 keras.losses.hinge, 40 keras.losses.categorical_crossentropy, 41 keras.losses.binary_crossentropy, 42 keras.losses.kullback_leibler_divergence, 43 keras.losses.poisson [all...] |
metrics.py | 25 from tensorflow.python.keras._impl.keras.losses import binary_crossentropy 26 from tensorflow.python.keras._impl.keras.losses import categorical_crossentropy 27 from tensorflow.python.keras._impl.keras.losses import cosine_proximity 28 from tensorflow.python.keras._impl.keras.losses import hinge 29 from tensorflow.python.keras._impl.keras.losses import kullback_leibler_divergence 30 from tensorflow.python.keras._impl.keras.losses import logcosh 31 from tensorflow.python.keras._impl.keras.losses import mean_absolute_error 32 from tensorflow.python.keras._impl.keras.losses import mean_absolute_percentage_error 33 from tensorflow.python.keras._impl.keras.losses import mean_squared_error 34 from tensorflow.python.keras._impl.keras.losses import mean_squared_logarithmic_erro [all...] |
/external/tensorflow/tensorflow/contrib/gan/python/losses/python/ |
tuple_losses.py | 21 from tensorflow.contrib.gan.python.losses.python import tuple_losses_impl 22 from tensorflow.contrib.gan.python.losses.python.tuple_losses_impl import *
|
losses_wargs.py | 21 from tensorflow.contrib.gan.python.losses.python import losses_impl 22 from tensorflow.contrib.gan.python.losses.python.losses_impl import *
|
losses_impl.py | 15 """Losses that are useful for training GANs. 17 The losses belong to two main groups, but there are others that do not: 28 All losses must be able to accept 1D or 2D Tensors, so as to be compatible with 29 patchGAN style losses (https://arxiv.org/abs/1611.07004). 31 To make these losses usable in the TFGAN framework, please create a tuple 32 version of the losses with `losses_utils.py`. 51 from tensorflow.python.ops.losses import losses 52 from tensorflow.python.ops.losses import util 74 # Wasserstein losses from `Wasserstein GAN` (https://arxiv.org/abs/1701.07875) [all...] |
/external/tensorflow/tensorflow/contrib/losses/python/metric_learning/ |
__init__.py | 15 """Ops for building neural network losses. 17 See @{$python/contrib.losses}. 25 from tensorflow.contrib.losses.python.metric_learning.metric_loss_ops import *
|
/external/tensorflow/tensorflow/contrib/kernel_methods/python/ |
losses_test.py | 15 """Tests for third_party.tensorflow.contrib.kernel_methods.python.losses.""" 23 from tensorflow.contrib.kernel_methods.python import losses 39 _ = losses.sparse_multiclass_hinge_loss(labels, logits) 47 _ = losses.sparse_multiclass_hinge_loss(labels, logits) 56 _ = losses.sparse_multiclass_hinge_loss(labels, logits, weights) 64 _ = losses.sparse_multiclass_hinge_loss(labels, logits) 72 _ = losses.sparse_multiclass_hinge_loss(labels, logits, weights=None) 81 _ = losses.sparse_multiclass_hinge_loss(labels, logits, weights) 90 _ = losses.sparse_multiclass_hinge_loss(labels, logits, weights) 98 loss = losses.sparse_multiclass_hinge_loss(labels, logits [all...] |
losses.py | 27 from tensorflow.python.ops.losses import losses 35 loss_collection=ops.GraphKeys.LOSSES, 36 reduction=losses.Reduction.SUM_BY_NONZERO_WEIGHTS): 134 return losses.compute_weighted_loss(
|
/external/tensorflow/tensorflow/python/kernel_tests/ |
losses_test.py | 15 """Tests for losses.""" 34 from tensorflow.python.ops.losses import losses 35 from tensorflow.python.ops.losses import util 50 losses.absolute_difference( 54 loss = losses.absolute_difference(self._predictions, self._predictions) 59 loss = losses.absolute_difference(self._labels, self._predictions) 65 loss = losses.absolute_difference(self._labels, self._predictions, weights) 71 loss = losses.absolute_difference(self._labels, self._predictions, 78 loss = losses.absolute_difference(self._labels, self._predictions, weights [all...] |
/external/tensorflow/tensorflow/contrib/tpu/python/tpu/ |
tpu_optimizer.py | 24 from tensorflow.python.ops.losses import losses 34 reduction=losses.Reduction.MEAN, 40 reduction: The reduction to apply to the shard losses. 47 if reduction not in (losses.Reduction.SUM, losses.Reduction.MEAN): 82 if num_shards > 1 and self._reduction == losses.Reduction.MEAN:
|
/external/tensorflow/tensorflow/contrib/learn/python/learn/ops/ |
losses_ops.py | 27 from tensorflow.python.ops.losses import losses 30 @deprecated('2016-12-01', 'Use `tf.losses.mean_squared_error` ' 39 return predictions, losses.mean_squared_error(labels, predictions) 42 @deprecated('2016-12-01', 'Use `tf.losses.softmax_cross_entropy` ' 75 return nn.softmax(logits), losses.softmax_cross_entropy(labels, logits)
|
/external/tensorflow/tensorflow/python/ops/ |
nn_xent_test.py | 53 losses = np.array(self._SigmoidCrossEntropyWithLogits(x, y)).reshape(*sizes) 54 return logits, targets, losses 67 logits, targets, losses = self._Inputs(dtype=dtype) 70 np_loss = np.array(losses).astype(np.float32) 78 logits, targets, losses = self._Inputs(dtype=dtype, sizes=[2, 2, 2]) 81 np_loss = np.array(losses).astype(np.float32) 129 losses = np.array(self._WeightedCrossEntropy(x, y, q)).reshape(*sizes) 130 return logits, targets, q, losses 142 logits, targets, pos_weight, losses = self._Inputs(dtype=dtypes.float32) 145 np_loss = np.array(losses).astype(np.float32 [all...] |
/external/tensorflow/tensorflow/contrib/boosted_trees/python/utils/ |
losses_test.py | 23 from tensorflow.contrib.boosted_trees.python.utils import losses 51 loss_for_positives, _ = losses.per_example_exp_loss( 54 loss_for_negatives, _ = losses.per_example_exp_loss( 88 loss_tensor, _ = losses.per_example_squared_loss(labels, weights,
|
/external/tensorflow/tensorflow/contrib/kernel_methods/ |
__init__.py | 26 from tensorflow.contrib.kernel_methods.python.losses import sparse_multiclass_hinge_loss
|
/external/tensorflow/tensorflow/contrib/estimator/python/estimator/ |
multi_head.py | 43 * For training, sums losses of each head, calls `train_op_fn` with this 100 merging losses to calculate the weighted sum of losses from each head. If 101 `None`, all losses are weighted equally. 135 def _merge_losses(losses, head_weights=None): 136 """Merges the given losses into one tensor.""" 137 losses = tuple(losses) 139 'merge_losses', values=losses + (head_weights or tuple())): 142 for loss, weight in zip(losses, head_weights) [all...] |
/external/tensorflow/tensorflow/contrib/bayesflow/python/kernel_tests/ |
layers_dense_variational_test.py | 113 losses = ops.get_collection(ops.GraphKeys.REGULARIZATION_LOSSES) 114 self.assertEqual(len(losses), 0) 115 self.assertListEqual(layer.losses, losses) 120 losses = ops.get_collection(ops.GraphKeys.REGULARIZATION_LOSSES) 121 self.assertEqual(len(losses), 1) 122 self.assertListEqual(layer.losses, losses) 136 losses = ops.get_collection(ops.GraphKeys.REGULARIZATION_LOSSES) 137 self.assertEqual(len(losses), 0 [all...] |