Python tf.zeros用法及代码示例

您所在的位置:网站首页 python中的zeros_like用法 Python tf.zeros用法及代码示例

Python tf.zeros用法及代码示例

#Python tf.zeros用法及代码示例| 来源: 网络整理| 查看: 265

创建一个所有元素都设置为零的张量。

用法tf.zeros( shape, dtype=tf.dtypes.float32, name=None )参数 shape 整数的 list、整数的 tuple 或 int32 类型的一维 Tensor 。 dtype 结果 Tensor 中元素的 DType。 name 可选字符串。操作的名称。 返回 一个Tensor,所有元素都设置为零。

另见tf.zeros_like、tf.ones、tf.fill、tf.eye。

此操作返回一个类型为 dtype 的张量,其形状为 shape,并且所有元素都设置为零。

tf.zeros([3, 4], tf.int32)

相关用法

Python tf.zeros_like用法及代码示例 Python tf.zeros_initializer.from_config用法及代码示例 Python tf.compat.v1.distributions.Multinomial.stddev用法及代码示例 Python tf.compat.v1.distribute.MirroredStrategy.experimental_distribute_dataset用法及代码示例 Python tf.compat.v1.data.TFRecordDataset.interleave用法及代码示例 Python tf.summary.scalar用法及代码示例 Python tf.linalg.LinearOperatorFullMatrix.matvec用法及代码示例 Python tf.linalg.LinearOperatorToeplitz.solve用法及代码示例 Python tf.raw_ops.TPUReplicatedInput用法及代码示例 Python tf.raw_ops.Bitcast用法及代码示例 Python tf.compat.v1.distributions.Bernoulli.cross_entropy用法及代码示例 Python tf.compat.v1.Variable.eval用法及代码示例 Python tf.compat.v1.train.FtrlOptimizer.compute_gradients用法及代码示例 Python tf.distribute.OneDeviceStrategy.experimental_distribute_values_from_function用法及代码示例 Python tf.math.special.fresnel_cos用法及代码示例 Python tf.keras.applications.inception_resnet_v2.preprocess_input用法及代码示例 Python tf.compat.v1.layers.conv3d用法及代码示例 Python tf.Variable.__lt__用法及代码示例 Python tf.keras.metrics.Mean.merge_state用法及代码示例 Python tf.keras.layers.InputLayer用法及代码示例

注:本文由纯净天空筛选整理自tensorflow.org大神的英文原创作品 tf.zeros。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3