#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019/10/10 13:50
# @Site :
# @File : distributed_MNIST.py
# @Software: PyCharm
import tensorflow as tf
from tensorflow.contrib.learn.python.learn.datasets.mnist import read_data_sets
tf.app.flags.DEFINE_string("ps_hosts", "10.10.50.1:2223", "ps hosts")
tf.app.flags.DEFINE_string("worker_hosts", "10.10.50.1:2225,10.10.50.2:2225", "worker hosts")
tf.app.flags.DEFINE_string("job_name", "worker", "'ps' or 'worker'")
tf.app.flags.DEFINE_integer("task_index", 0, "Index of task within the job")
tf.app.flags.DEFINE_integer("num_workers", 2, "Number of workers")
tf.app.flags.DEFINE_boolean("is_sync", False, "using synchronous training or not")
FLAGS = tf.app.flags.FLAGS
def model(images):
"""Define a simple mni
Tensorflow分布式训练
最新推荐文章于 2022-11-29 14:14:44 发布