python - 分布式张量流无法共置节点 /job:master/task:0' 和 '/job:ps/task:0'
问题描述
我正在尝试使用 tf.keras 模型和估计器 api 设置分布式张量流。我遇到了问题:
InvalidArgumentError(有关回溯,请参见上文):无法将节点“Decoder-Word-Embedding/embeddings”和“training/Nadam/gradients/Decoder-Word-Embedding/GatherV2_grad/Shape”放在一起:无法合并具有不兼容作业的设备:“/job:master /task:0' 和 '/job:ps/task:0'
节点:Decoder-Word-Embedding/embeddings = VariableV2_class=["loc:@Decoder-Word-Embedding/embeddings"], container="", dtype= DT_FLOAT, shape=[4259,300], shared_name="", _device="/job:ps/task:0"]]
这是我正在运行的 TF_CONFIG
{"cluster":{"master":["localhost:22222"],"ps":["localhost:22223"],"worker":["localhost:22224"]},"task":{"type ":"worker","index":0},"model_dir":"/data/models/"}
这是运行的代码:https ://github.com/inc0/github_issue/blob/master/train.py
解决方案
推荐阅读
- laravel - 获取最新的 10 个产品在 Laravel8 中给了我最后一个产品 10 次
- sql - 如何从 SQL Server 获取星期日期(7 天间隔)
- bash - 直接从命令行接收值
- ios - 如何在 WidgetKit 中显示来自 HealthKit 和互联网的数据
- reactjs - 可以有一个 HOC 只用于在 React 的 CSS 类中包装孩子吗?
- wildcard - 从 (GNU)tar 存档中提取子文件夹
- flutter - 更新旧应用程序导致此错误 => 无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系
- bootstrap-modal - Bootstrap 5使用java脚本隐藏模式
- c# - 我可以重载 = 赋值运算符吗?
- python - 从列表中获取每个值并在数据框中迭代以总结具有多个条件的列中的数值