MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _enter_or_assert_strategy

Function _enter_or_assert_strategy

tensorflow/python/distribute/values.py:584–590  ·  view source on GitHub ↗
(strategy)

Source from the content-addressed store, hash-verified

582
583@contextlib.contextmanager
584def _enter_or_assert_strategy(strategy):
585 if not distribution_strategy_context.has_strategy():
586 with strategy.scope():
587 yield
588 else:
589 _assert_strategy(strategy)
590 yield
591
592
593DistributedVarOp = collections.namedtuple(

Callers 8

read_valueMethod · 0.85
_assign_funcMethod · 0.85
_assign_funcMethod · 0.85
assign_subMethod · 0.85
assign_addMethod · 0.85
assignMethod · 0.85
_get_cross_replicaMethod · 0.85
_assign_funcMethod · 0.85

Calls 2

_assert_strategyFunction · 0.85
scopeMethod · 0.45

Tested by

no test coverage detected