codecamp

TensorFlow随机值:tf.random_normal函数

tf.random_normal 函数
random_normal(
    shape,
    mean=0.0,
    stddev=1.0,
    dtype=tf.float32,
    seed=None,
    name=None
)

定义在:tensorflow/python/ops/random_ops.py.

请参阅指南:生成常量,序列和随机值>随机张量

从正态分布中输出随机值.

参数:

  • shape:一维整数张量或 Python 数组.输出张量的形状.
  • mean:dtype 类型的0-D张量或 Python 值.正态分布的均值.
  • stddev:dtype 类型的0-D张量或 Python 值.正态分布的标准差.
  • dtype:输出的类型.
  • seed:一个 Python 整数.用于为分发创建一个随机种子.查看 tf.set_random_seed 行为.
  • name:操作的名称(可选).

返回:

将返回一个指定形状的张量,通过随机的正常值填充.

TensorFlow函数:tf.random_gamma
tf.random_normal_initializer: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; }