我的代码很简单:
import tensorflow as tf
import numpy as np
from tensorflow.python import debug as tf_debug
with tf.name_scope("multiplication"):
a = tf.placeholder(tf.float32)
b = tf.placeholder(tf.float32)
c = tf.div(a, b, name="mult")
with tf.Session() as session:
session = tf_debug.LocalCLIDebugWrapperSession(session)
session.add_tensor_filter("has_inf_or_nan", tf_debug.has_inf_or_nan)
session.run([ c],feed_dict={a:100, b:10})
Run Code Online (Sandbox Code Playgroud)
但当我跑它时:
>python test.py --debug
...
ImportError: No module named '_curses'
...
ImportError: No module named 'readline'`
Run Code Online (Sandbox Code Playgroud)
我在网上查了一下,发现Windows 10不支持"_curses".这是否意味着我不能在Windows 10上使用Tensorflow Debugger?
小智 5
根据:https://www.tensorflow.org/programmers_guide/debugger 您必须在cmd中写下以下内容:
pip install pyreadline
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1692 次 |
| 最近记录: |