【问题标题】:What is the difference between variable_ops_scope and variable_scope?variable_ops_scope 和 variable_scope 有什么区别?
【发布时间】:2016-08-09 03:04:40
【问题描述】:

在 TensorFlow 中,有两个作用域函数:variable_ops_scopevariable_scope。第一个签名如下:

variable_op_scope(values, name_or_scope, default_name,initializer, 
                  regularizer, caching_device, partitioner, reuse)

第一个参数values是什么意思? default_name 只在name_or_scopeNone 时使用,那么为什么这个函数需要带这两个参数呢?一个参数就够了。

总的来说,这两种作用域有什么区别?

【问题讨论】:

    标签: machine-learning tensorflow tensorflow-serving


    【解决方案1】:

    variable_ops_scopevariable_scope 的包装器。就像tf.variable_scope 一样,但还执行了 2 件事:

    1. 验证值是否来自同一个图表

    2. 如果name_or_scopeNone,则default_name 将被使用并且在需要时是唯一的。请注意,如果name_or_scope 不是None,它将被使用但不是唯一的,并且default_name 将不会被使用。

    【讨论】:

      猜你喜欢
      • 2016-03-16
      • 2010-10-02
      • 2011-12-12
      • 2010-09-16
      • 2012-03-14
      • 2012-02-06
      • 2011-02-25
      • 2011-11-22
      • 2015-03-26
      相关资源
      最近更新 更多