我该如何指定分布式tensorflow中ps作业的哪些变量

时间:2018-06-11 15:32:40

标签: tensorflow distributed

当我尝试启动2ps和2worker时,这是错误信息:

那么我应该如何指定分布式tensorflow中ps作业的哪些变量。我不使用gpu,只有cpu。我不知道这个错误是由什么引起的 设备设定器设置错误?

device_setter = tf.train.replica_device_setter(cluster=clusterSpec)
with tf.device('/job:worker/task:%d' % FLAGS.task_id):
    with tf.device(device_setter):
        global_step = tf.Variable(0, trainable=False)

        # Get images and labels for CIFAR-10.
        images, labels = cifar10.distorted_inputs()

0 个答案:

没有答案
相关问题