首页 > 其他 > 详细

tensorflow常用函数(二)

时间:2019-11-18 22:26:14      阅读:63      评论:0      收藏:0      [点我收藏+]

一、变量相关的函数

1)tf.train.list_variables(ckpt_dir_or_file)    Returns list of all variables in the checkpoint

2)tf.global_variables_initializer()   用于初始化所有的变量(GraphKeys.VARIABLES),替代 tf.initialize_all_variables()。

3)tf.Variable(initial_value=None, trainable=True, collections=None, validate_shape=True, caching_device=None, name=None, variable_def=None, dtype=None, expected_shape=None, import_scope=None) 构建一个变量

trainable:   默认为`True`,则默认值也将变量添加到图形中集合`GraphKeys.TRAINABLE_VARIABLES`。#这个集合用作“Optimizer”类使用的默认变量列表。

collections:图表集合键的列表。新的变量被添加到这些集合。默认为`[GraphKeys.GLOBAL_VARIABLES]`)

 

tensorflow常用函数(二)

原文:https://www.cnblogs.com/gczr/p/11885901.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!