class_docstr: Class to choose devices for Ops in a replicated training setup.
  
  This class is not to be used directly by users.  See instead
  `replica_device_setter()` below.
docstr: Create a new `_ReplicaDeviceChooser`.
  
  Args:
    ps_tasks: Number of tasks in the `ps` job.
    ps_device: String.  Name of the `ps` job.
    worker_device: String.  Name of the `worker` job.
    merge_devices: Boolean. Set to True to allow merging of device specs.
    ps_ops: List of strings representing `Operation` types that need to be
      placed on `ps` devices.
    ps_strategy: A callable invoked for every ps `Operation` (i.e. matched by
      `ps_ops`), that takes the `Operation` and returns the ps task index to
      use.
code: def __init__(
      self,
      ps_tasks,
      ps_device,
      worker_device,
      merge_devices,
      ps_ops,
      ps_strategy,
  ):
      """Create a new `_ReplicaDeviceChooser`.
  
      Args:
        ps_tasks: Number of tasks in the `ps` job.
        ps_device: String.  Name of the `ps` job.
        worker_device: String.  Name of the `worker` job.
        merge_devices: Boolean. Set to True to allow merging of device specs.
        ps_ops: List of strings representing `Operation` types that need to be
          placed on `ps` devices.
        ps_strategy: A callable invoked for every ps `Operation` (i.e. matched by
          `ps_ops`), that takes the `Operation` and returns the ps task index to
          use.
      """
      self._ps_tasks = ps_tasks
      self._ps_device = ps_device
      self._worker_device = worker_device
      self._merge_devices = merge_devices
      self._ps_ops = ps_ops
      self._ps_strategy = ps_strategy
  
file_path: tensorflow/tensorflow/python/training/device_setter.py
imports: from tensorflow.core.framework import node_def_pb2
  from tensorflow.python.framework import device
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.training import server_lib
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 1 to create a new _ReplicaDeviceChooser object  with example: obj = _ReplicaDeviceChooser(ps_tasks, ps_device, worker_device, merge_devices, ps_ops, ps_strategy)