Graph Replicator.

class Replicator(key, graph_item, config, cluster)[source]

Bases: autodist.kernel.kernel.Kernel

Used to perform in-graph replication on a computational graph.

That is, Replicator is used to create _n_ replicas of a tf.Graph, with all replicas being stored in a new tf.Graph and delineated with name scopes.

This also handles ControlFlowContexts, updating variable and gradient information, etc.


Replicate the entire graph as many times as num_replica.


graph_item – the original graph item

Returns: The new graph item

classmethod apply(*args, **kwargs)[source]

Apply the Kernel transformation.