【发布时间】:2017-02-23 00:53:24
【问题描述】:
我正在按照示例 here 创建一个带有参数服务器和 n 个工作人员的分布式张量流模型。我没有任何 GPU,所有工作都分布在 CPU 上
在首席工作者中,我想每隔几步保存我的变量,但调用保护程序会导致以下异常:
Cannot assign a device to node 'save_1/RestoreV2_21':
Could not satisfy explicit device specification
'/job:ps/task:0/device:CPU:0' because no devices matching that
specification are registered in this process; available devices:
/job:localhost/replica:0/task:0/cpu:0
[[Node: save_1/RestoreV2_21 = RestoreV2[dtypes=[DT_INT32],
_device="/job:ps/task:0/device:CPU:0"](save_1/Const,
save_1/RestoreV2_21/tensor_names, save_1/RestoreV2_21/shape_and_slices)]]
我试过了:
server = tf.train.Server(cluster,
job_name=self.calib.params['job_name'],
task_index=self.calib.params['task_index'],
config=tf.ConfigProto(allow_soft_placement=True)
我正在使用主管:
sv = tf.train.Supervisor(
is_chief=is_chief,
...)
并按如下方式创建我的会话:
sess = sv.prepare_or_wait_for_session(server.target)
但我仍然有完全相同的错误
【问题讨论】:
标签: tensorflow