美文网首页
2019-02-26

2019-02-26

作者: _白马 | 来源:发表于2019-02-26 12:02 被阅读0次

tf.Variable
tf.Variable.init(initial_value, trainable=True, collections=None, validate_shape=True, name=None)

参数名称 参数类型 含义
initial_value 所有可以转换为Tensor的类型 变量的初始值
trainable bool 如果为True,会把它加入到GraphKeys.TRAINABLE_VARIABLES,才能 对它使用Optimizer
collections list 指定该图变量的类型、默认为[GraphKeys.GLOBAL_VARIABLES]
validate_shape bool 如果为False,则不进行类型和维度检查
name string 变量的名称,如果没有指定则系统会自动分配一个唯一的值

tf.get_variable(name, shape=None, dtype=tf.float32, initializer=None,
regularizer=None, trainable=True, collections=None)

相关文章

网友评论

      本文标题:2019-02-26

      本文链接:https://www.haomeiwen.com/subject/kjcayqtx.html