使用分布式 TensorFlow 时未找到 GrpcServer class

GrpcServer class not found when using distributed TensorFlow

我正在尝试使用以下简单命令测试 TensorFlow 的分布式计算功能:

>>> import tensorflow as tf
>>> c = tf.constant("Hello, distributed TensorFlow!")
>>> server = tf.GrpcServer.create_local_server()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'GrpcServer'
>>> 

但是,正如您在上面看到的,它会抛出一个错误,指出无法找到 GrpcServer。我已将 TensorFlow 安装到 "Virtualenv" 中,MNIST 示例运行良好。如何测试TensorFlow的分布式能力?

class tf.GrpcServer 仅在安装 nightly build TensorFlow 或从源代码构建时可用。它将包含在下一个版本(版本 0.8)中。