codecamp

TensorFlow 发出随机值的张量

tf.contrib.bayesflow.stochastic_tensor.BaseStochasticTensor


tf.contrib.bayesflow.stochastic_tensor.BaseStochasticTensor 类

定义在:tensorflow/contrib/bayesflow/python/ops/stochastic_tensor_impl.py.

参见指南:BayesFlow随机张量(contrib)>随机张量类

用于发出随机值的张量对象的基类.

属性

  • dtype
  • graph
  • name 

方法

  • __init__
  • __init__ ()
  • loss
  • loss( sample_loss )

返回添加到代理损失中的术语.

这个方法被 surrogate_loss 调用.输入 sample_loss 应该已经应用了 stop_gradient.这是因为 surrogate_loss 通常提供了一个 Monte Carlo 样例术语 differentiable_surrogate * sample_loss,其中 sample_loss 被认为是常量,因为它的目的是梯度输入.

ARGS:

  • sample_loss:张量,在这个 StochasticTensor 的下游样本损失.

返回:

要么返回 None ,要么返回 Tensor.

value

value( name = None )
TensorFlow 随机图的代理损失
TensorFlow 获取随机张量值类型
温馨提示
下载编程狮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; }