codecamp

TensorFlow函数:tf.variables_initializer

tf.variables_initializer函数

别名:

  • tf.initializers.variables
  • tf.variables_initializer
tf.variables_initializer(
    var_list,
    name='init'
)

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

请参阅指南:变量>变量帮助函数

返回一个初始化变量列表的操作.

在会话(session)中启动图形之后,可以运行返回的操作来初始化 var_list 中的所有变量.该操作在 var_listparalle 中并行运行变量的所有初始化程序.

调用 initialize_variables() 相当于将初始化出现的列表传递给 Group().

但是,如果该 var_list 为空,该 tf.variables_initializer 函数仍会返回可以运行的操作.该操作只是没有效果.

函数参数:

  • var_list:要初始化的 Variable 对象列表.
  • name:返回操作的可选名称.

函数返回值:

tf.variables_initializer 函数返回运行所有指定变量的初始值设定项的操作.

TensorFlow函数:tf.unstack
TensorFlow函数:tf.variable_axis_size_partitioner
温馨提示
下载编程狮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; }