Python TensorFlow张力板问题
我跟在后面。我已经逐字复制了代码,所以没有看到任何错误。 当我尝试添加这一行为TensorBoard创建文件时出现错误:Python TensorFlow张力板问题,python,tensorflow,python-3.5,tensorboard,Python,Tensorflow,Python 3.5,Tensorboard,我跟在后面。我已经逐字复制了代码,所以没有看到任何错误。 当我尝试添加这一行为TensorBoard创建文件时出现错误: logs_path = '/tensor_board' writer = tf.summary.FileWriter(logs_path, graph=tf.get_default_graph()) # RUN sess.run(init, writer) 当我运行整个代码时,Python会将此作为错误返回: Traceback (most recent call last
logs_path = '/tensor_board'
writer = tf.summary.FileWriter(logs_path, graph=tf.get_default_graph())
# RUN
sess.run(init, writer)
当我运行整个代码时,Python会将此作为错误返回:
Traceback (most recent call last):
File "tf_number_recon.py", line 39, in <module>
sess.run(init, writer)
File "C:\Python35\lib\site-packages\tensorflow\python\client\session.py", line 766, in run
run_metadata_ptr)
File "C:\Python35\lib\site-packages\tensorflow\python\client\session.py", line 913, in _run
feed_dict = nest.flatten_dict_items(feed_dict)
File "C:\Python35\lib\site-packages\tensorflow\python\util\nest.py", line 171, in flatten_dict_items
raise TypeError("input must be a dictionary")
TypeError: input must be a dictionary
进行这些更改后,代码运行不会出现任何问题
logs_path = './tensor_board'
sess.run(init)
logs_path = './tensor_board'
sess.run(init)