Module: tf.contrib.losses
Stay organized with collections
Save and categorize content based on your preferences.
Ops for building neural network losses.
See Contrib Losses.
Modules
metric_learning
module: Ops for building neural network losses.
Functions
absolute_difference(...)
: Adds an Absolute Difference loss to the training procedure. (deprecated)
add_loss(...)
: Adds a externally defined loss to the collection of losses. (deprecated)
compute_weighted_loss(...)
: Computes the weighted loss. (deprecated)
cosine_distance(...)
: Adds a cosine-distance loss to the training procedure. (deprecated arguments) (deprecated)
get_losses(...)
: Gets the list of losses from the loss_collection. (deprecated)
get_regularization_losses(...)
: Gets the regularization losses. (deprecated)
get_total_loss(...)
: Returns a tensor whose value represents the total loss. (deprecated)
hinge_loss(...)
: Method that returns the loss tensor for hinge loss. (deprecated)
log_loss(...)
: Adds a Log Loss term to the training procedure. (deprecated)
mean_pairwise_squared_error(...)
: Adds a pairwise-errors-squared loss to the training procedure. (deprecated)
mean_squared_error(...)
: Adds a Sum-of-Squares loss to the training procedure. (deprecated)
sigmoid_cross_entropy(...)
: Creates a cross-entropy loss using tf.nn.sigmoid_cross_entropy_with_logits. (deprecated)
softmax_cross_entropy(...)
: Creates a cross-entropy loss using tf.nn.softmax_cross_entropy_with_logits. (deprecated)
sparse_softmax_cross_entropy(...)
: Cross-entropy loss using tf.nn.sparse_softmax_cross_entropy_with_logits
. (deprecated)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2020-10-01 UTC."],[],[],null,["# Module: tf.contrib.losses\n\n\u003cbr /\u003e\n\n|----------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/losses/__init__.py) |\n\nOps for building neural network losses.\n\nSee [Contrib Losses](https://tensorflow.org/api_guides/python/contrib.losses).\n\nModules\n-------\n\n[`metric_learning`](../../tf/contrib/losses/metric_learning) module: Ops for building neural network losses.\n\nFunctions\n---------\n\n[`absolute_difference(...)`](../../tf/contrib/losses/absolute_difference): Adds an Absolute Difference loss to the training procedure. (deprecated)\n\n[`add_loss(...)`](../../tf/contrib/losses/add_loss): Adds a externally defined loss to the collection of losses. (deprecated)\n\n[`compute_weighted_loss(...)`](../../tf/contrib/losses/compute_weighted_loss): Computes the weighted loss. (deprecated)\n\n[`cosine_distance(...)`](../../tf/contrib/losses/cosine_distance): Adds a cosine-distance loss to the training procedure. (deprecated arguments) (deprecated)\n\n[`get_losses(...)`](../../tf/contrib/losses/get_losses): Gets the list of losses from the loss_collection. (deprecated)\n\n[`get_regularization_losses(...)`](../../tf/contrib/losses/get_regularization_losses): Gets the regularization losses. (deprecated)\n\n[`get_total_loss(...)`](../../tf/contrib/losses/get_total_loss): Returns a tensor whose value represents the total loss. (deprecated)\n\n[`hinge_loss(...)`](../../tf/contrib/losses/hinge_loss): Method that returns the loss tensor for hinge loss. (deprecated)\n\n[`log_loss(...)`](../../tf/contrib/losses/log_loss): Adds a Log Loss term to the training procedure. (deprecated)\n\n[`mean_pairwise_squared_error(...)`](../../tf/contrib/losses/mean_pairwise_squared_error): Adds a pairwise-errors-squared loss to the training procedure. (deprecated)\n\n[`mean_squared_error(...)`](../../tf/contrib/losses/mean_squared_error): Adds a Sum-of-Squares loss to the training procedure. (deprecated)\n\n[`sigmoid_cross_entropy(...)`](../../tf/contrib/losses/sigmoid_cross_entropy): Creates a cross-entropy loss using tf.nn.sigmoid_cross_entropy_with_logits. (deprecated)\n\n[`softmax_cross_entropy(...)`](../../tf/contrib/losses/softmax_cross_entropy): Creates a cross-entropy loss using tf.nn.softmax_cross_entropy_with_logits. (deprecated)\n\n[`sparse_softmax_cross_entropy(...)`](../../tf/contrib/losses/sparse_softmax_cross_entropy): Cross-entropy loss using [`tf.nn.sparse_softmax_cross_entropy_with_logits`](../../tf/nn/sparse_softmax_cross_entropy_with_logits). (deprecated)"]]