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

Method from_proto

tensorflow/python/ops/control_flow_ops.py:922–930  ·  view source on GitHub ↗

Returns a `CondContext` object created from `context_def`.

(context_def, import_scope=None)

Source from the content-addressed store, hash-verified

920
921 @staticmethod
922 def from_proto(context_def, import_scope=None):
923 """Returns a `CondContext` object created from `context_def`."""
924 ret = CondContext(context_def=context_def, import_scope=import_scope)
925
926 ret.Enter()
927 for nested_def in context_def.nested_contexts:
928 from_control_flow_context_def(nested_def, import_scope=import_scope)
929 ret.Exit()
930 return ret
931
932 def to_control_flow_context_def(self, context_def, export_scope=None):
933 context_def.cond_ctxt.CopyFrom(self.to_proto(export_scope=export_scope))

Callers 1

Calls 4

CondContextClass · 0.85
EnterMethod · 0.45
ExitMethod · 0.45

Tested by

no test coverage detected