codecamp

TensorFlow函数:tf.zeros_initializer

tf.zeros_initializer函数

zeros_initializer类

别名:

  • 类 tf.initializers.zeros
  • 类 tf.keras.initializers.Zeros
  • 类 tf.zeros_initializer

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

请参阅指南:变量>共享变量

生成张量初始化为0的初始化器.

方法

__init__

__init__(dtype=tf.float32)

__call__

__call__(
    shape,
    dtype=None,
    partition_info=None
)

from_config

from_config(
    cls,
    config
)

从配置字典中实例化初始化程序.

示例如下:

initializer = RandomUniform(-1, 1)
config = initializer.get_config()
initializer = RandomUniform.from_config(config)

函数参数:

  • config:一个Python字典.它通常是get_config的输出.

函数返回值:

一个初始化实例.

get_config

get_config()
TensorFlow函数:tf.zeros
TensorFlow函数:tf.zeros_like
温馨提示
下载编程狮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; }