Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/318.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python TensorFlow张力板问题_Python_Tensorflow_Python 3.5_Tensorboard - Fatal编程技术网

Python TensorFlow张力板问题

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

我跟在后面。我已经逐字复制了代码,所以没有看到任何错误。 当我尝试添加这一行为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):
  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)