TensorFlow 分布式集群 Local Server
2017-10-18 09:01
148 查看
在 TensorFlow 中提供了一个简单分布式的服务(Local Server)功能,利用 Local Server 服务,可以运行一个简单的分布式程序。Local Server 实现了与和分布式服务一样的接口,因此对于开发测试还是比较方便的。
下面是最简单的例子
其中,tf.train.Server.create_local_server() 方法创建了一个单一的进程集群。
此外,运行这个程序,实际上是 server 和 client 启动在了同一个进程了。
下面是最简单的例子
import tensorflow as tf server = tf.train.Server.create_local_server() with tf.Session(server.target) as session: matrix1 = tf.constant([[3., 3.]]) matrix2 = tf.constant([[2.],[2.]]) product = tf.matmul(matrix1, matrix2) result = session.run(product) print result
其中,tf.train.Server.create_local_server() 方法创建了一个单一的进程集群。
此外,运行这个程序,实际上是 server 和 client 启动在了同一个进程了。
相关文章推荐
- 理解和实现分布式TensorFlow集群完整教程
- 理解和实现分布式TensorFlow集群完整教程
- 理解和实现分布式TensorFlow集群完整教程
- 理解和实现分布式TensorFlow集群完整教程
- TensorFlow 分布式集群
- ubuntu 虚拟机 完全分布式 hadoop集群搭建 hive搭建 ha搭建
- 两分钟理解分布式和集群
- 集群和分布式区别
- Spark入门 - 1 搭建Hadoop分布式集群
- 如何在虚拟机上搭建并配置一个分布式的 Spark2.2.0 集群
- 虚拟机搭建hadoop的全分布式集群-in detail(1)
- 分布式服务集群
- 并行计算、分布式计算及集群、网格、云计算之间的联系与区别
- spring session和redis集群打造分布式会话使用方案及错误解决
- 集群,负载均衡,分布式的区别
- 分布式架构高可用架构篇_03-redis3集群的安装高可用测试
- 漫谈分布式集群的负载均衡—口水篇
- Ambari安装之部署3个节点的HA分布式集群
- Hadoop在百度的应用--4000个节点的分布式集群