
[英]Simple Tensorflow example not working in Jupyter Notebook
[英]Distributed Tensorflow not working with simple example
我在这里跟随一个示例,以在MNIST上学习分布式TF。 我将集群配置更改为:
parameter_servers = ["1.2.3.4:2222"]
workers = [ "1.2.3.4:2222", "5.6.7.8:2222"]
1.2.3.4
和5.6.7.8
只是我两个节点的表示。 它们不是真实的IP地址。 整个脚本命名为example.py
在1.2.3.4
,我运行: python example.py --job_name=ps --task_index=0
然后在同一台机器上,我在另一个终端中运行python example --job_name=worker --task_index=0
。 看起来它正在等待。
在5,6,7,8
,我运行了python example.py --job_name=worker --taks_index=1
。 之后,我立即在5.6.7.8
上收到以下错误:
tensorflow.python.framework.errors.UnavailableError: {"created":"@1480458325.580095889","description":"EOF","file":"external/grpc/src/core/lib/iomgr/tcp_posix.c","file_line":235,"grpc_status":14}
I tensorflow/core/distributed_runtime/master_session.cc:845] DeregisterGraph error: Aborted: Graph handle is not found: . Possibly, this worker just restarted.
和
tensorflow/core/distributed_runtime/graph_mgr.cc:55] 'unit.device' Must be non NULL
Aborted (core dumped)
在1.2.3.4
这是因为我在同一台机器上同时运行参数服务器和工作程序吗? 我的节点数不超过2个,该如何解决?
因此,经过一天的努力,我终于得到了解决:
workers = [ "1.2.3.4:2222", "5.6.7.8:2222"]
更改为workers = [ "1.2.3.4:2223", "5.6.7.8:2222"]
。 注意端口号的变化。 这就是需要做的所有事情。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.