c787becf4d41944658591ea63ff56e4661ebc3eb,sonnet/src/replicator.py,Replicator,scope,#Replicator#,141
Before Change
@contextlib.contextmanager
def scope(self):
parent_scope = super(Replicator, self).scope()
with parent_scope, tf.variable_creator_scope(replica_local_creator):
yield
class TpuReplicator(tf.distribute.experimental.TPUStrategy):
rReplicates input, parameters and compute over multiple TPUs.
``TpuReplicator`` is a TensorFlow "Distribution Strategy" implementing the
After Change
@contextlib.contextmanager
def scope(self):
with contextlib.ExitStack() as stack:
stack.enter_context(super(Replicator, self).scope())
stack.enter_context(tf.variable_creator_scope(replica_local_creator))
yield
class TpuReplicator(tf.distribute.experimental.TPUStrategy):
rReplicates input, parameters and compute over multiple TPUs.
``TpuReplicator`` is a TensorFlow "Distribution Strategy" implementing the
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances Project Name: deepmind/sonnet
Commit Name: c787becf4d41944658591ea63ff56e4661ebc3eb
Time: 2019-10-30
Author: tomhennigan@google.com
File Name: sonnet/src/replicator.py
Class Name: Replicator
Method Name: scope
Project Name: GPflow/GPflow
Commit Name: 36d11b8206f8656ab97ee1c12637a149811ac188
Time: 2017-09-10
Author: art.art.v@gmail.com
File Name: GPflow/base.py
Class Name: CompilableNode
Method Name: compilation_context
Project Name: pantsbuild/pants
Commit Name: 8c35227c6e3c4a6b85d2f719c9a62031f5e4ca6f
Time: 2017-12-12
Author: kwlzn@users.noreply.github.com
File Name: src/python/pants/java/nailgun_io.py
Class Name: NailgunStreamWriter
Method Name: open
Project Name: deepmind/sonnet
Commit Name: bde4d188c147cb27b55c8b6c76bff14c0d490af8
Time: 2019-09-18
Author: tomhennigan@google.com
File Name: sonnet/src/replicator.py
Class Name: TpuReplicator
Method Name: scope