首页 > 解决方案 > 分布式张量流无法共置节点 /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

标签: pythontensorflowkerastensorflow-estimator

解决方案


推荐阅读