擅长:python、mysql、java
<p>有了估计器</p>
<pre><code>sess = tf.Session(config = xxxxxxxxxxxxx)
</code></pre>
<p>也不是说</p>
<pre><code>sess.run()
</code></pre>
<p>所以…不幸的是,tensorflow web中没有完整的文档。
我在尝试RunConfig的不同选项</p>
<pre><code># Create a tf.estimator.RunConfig to ensure the model is run on CPU, which
# trains faster than GPU for this model.
run_config = tf.estimator.RunConfig().replace(
session_config=tf.ConfigProto(log_device_placement=True,
device_count={'GPU': 0}))
</code></pre>
<p>试着处理这个…实际上我正在处理你的任务,如果我有进展,我会把它贴在这里。</p>
<p>请看这里:
<a href="https://github.com/tensorflow/models/blob/master/official/wide_deep/wide_deep.py" rel="nofollow noreferrer">https://github.com/tensorflow/models/blob/master/official/wide_deep/wide_deep.py</a>
在本例中,他们将上面显示的代码与.replace语句一起使用,以确保模型在CPU上运行。</p>