codecamp

TensorFlow模块:tf.losses

模块:tf.losses

定义在:tensorflow/tools/api/generator/api/losses/__init__.py.

用于Python API的导入.

这个文件是计算机生成的,请勿编辑!生成者:tensorflow/tools/api/generator/create_python_api.py脚本.

class Reduction:减少损失的类型.

功能

absolute_difference(...):在训练过程中添加绝对差值loss.

add_loss(...):为损失集合添加外部定义的loss.

compute_weighted_loss(...):计算加权loss.

cosine_distance(...):在训练过程中添加余弦距离loss.(不赞成的参数)

get_losses(...):获取loss_collection的loss列表.

get_regularization_loss(...):获取总正规化loss.

get_regularization_losses(...):获取正则化loss列表.

get_total_loss(...):返回其值表示总loss的张量.

hinge_loss(...):在训练过程中添加hinge loss.

huber_loss(...):在训练过程中添加Huber Loss.

log_loss(...):向训练过程中添加Log Loss.

mean_pairwise_squared_error(...):在训练过程中添加成对误差平方loss(pairwise-errors-squared loss).

mean_squared_error(...):在训练过程中添加平方和loss(Sum-of-Squares loss).

sigmoid_cross_entropy(...):使用tf.nn.sigmoid_cross_entropy_with_logits创建交叉熵loss.

softmax_cross_entropy(...):使用tf.nn.softmax_cross_entropy_with_logits创建交叉熵loss.

sparse_softmax_cross_entropy(...):使用tf.nn.sparse_softmax_cross_entropy_with_logits创建交叉熵loss.

其他成员

__cached__

__loader__

__spec__

TensorFlow函数:tf.logging.warning
TensorFlow函数:tf.losses.absolute_difference
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

TensorFlow 函数介绍

TensorFlow 函数模块:tf

TensorFlow的image模块

TensorFlow使用之tf.io

TensorFlow使用之tf.keras

TensorFlow函数教程:tf.keras.applications

TensorFlow函数教程:tf.keras.backend

TensorFlow使用之tf.metrics

TensorFlow使用之tf.nn

TensorFlow使用之tf.python_io

TensorFlow 功能函数

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }