|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
v_1 = tf.constant([1,2,3,4],name = "input1")
v_2 = tf.constant([2,1,5,3],name = "input2")
v_add = tf.add_n([v_1,v_2],name = "addOP")
with tf.compat.v1.Session() as sess:
sess.run(tf.compat.v1.global_variables_initializer())
writer = tf.compat.v1.summary.FileWriter('./tensorboard/test1', sess.graph)
print(sess.run(v_add))
writer.close()
出现问题:
C:\Users\Doris>tensorboard --logdir=D:\tempproject\test\tensorboard\test1
Traceback (most recent call last):
File "d:\tool\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "d:\tool\anaconda3\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\tool\Anaconda3\Scripts\tensorboard.exe\__main__.py", line 9, in <module>
File "d:\tool\anaconda3\lib\site-packages\tensorboard\main.py", line 58, in run_main
default.get_plugins() + default.get_dynamic_plugins(),
File "d:\tool\anaconda3\lib\site-packages\tensorboard\default.py", line 110, in get_dynamic_plugins
for entry_point in pkg_resources.iter_entry_points('tensorboard_plugins')
File "d:\tool\anaconda3\lib\site-packages\tensorboard\default.py", line 110, in <listcomp>
for entry_point in pkg_resources.iter_entry_points('tensorboard_plugins')
File "d:\tool\anaconda3\lib\site-packages\pkg_resources\__init__.py", line 2321, in load
self.require(*args, **kwargs)
File "d:\tool\anaconda3\lib\site-packages\pkg_resources\__init__.py", line 2344, in require
items = working_set.resolve(reqs, env, installer, extras=self.extras)
File "d:\tool\anaconda3\lib\site-packages\pkg_resources\__init__.py", line 783, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (setuptools 39.1.0 (d:\tool\anaconda3\lib\site-packages), Requirement.parse('setuptools>=41.0.0'))
你更新一下setuptools,显示版本太低
或者更新Python
|
|