tf.contrib.kfac.op_queue.OpQueue

Class OpQueue

Defined in tensorflow/contrib/kfac/python/ops/op_queue.py.

Class for choosing which Op to run next.

Constructs an infinitely repeating sequence of Ops in shuffled order.

In K-FAC, this can be used to distribute inverse update operations among workers.

Properties

ops

Ops this OpQueue can return in next_op().

Methods

__init__

__init__(
    ops,
    seed=None
)

Initializes an OpQueue.

Args:

  • ops: list of TensorFlow Ops. Ops to be selected from. All workers must initialize with the same set of ops.
  • seed: int or None. Random seed used when shuffling order of ops.

next_op

next_op(sess)

Chooses which op to run next.

Args:

  • sess: tf.Session.

Returns:

Next Op chosen from 'ops'.