【问题标题】:How do I get variables used in model/function pass to TensorFlowEstimator如何将模型/函数中使用的变量传递给 TensorFlowEstimator
【发布时间】:2016-05-21 16:19:54
【问题描述】:

在模型拟合后,使用 TensorFlowEstimator 进行拟合时如何获取变量(例如嵌入表、RNN 变量等),例如在这个skflow example 中?由于 tf.all_variables() 返回空列表。

【问题讨论】:

    标签: tensorflow skflow


    【解决方案1】:

    您可以在估算器中使用get_variable_names()

    基本上,您需要获取图形,然后调用all_variables()。例如: with self._graph.as_default(): print([v.name for v in variables.all_variables()])

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-04-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-12-23
      • 2014-04-03
      相关资源
      最近更新 更多