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

Method finalize

tensorflow/python/framework/ops.py:3085–3093  ·  view source on GitHub ↗

Finalizes this graph, making it read-only. After calling `g.finalize()`, no new operations can be added to `g`. This method is used to ensure that no operations are added to a graph when it is shared between multiple threads, for example when using a `tf.compat.v1.train.QueueRunner

(self)

Source from the content-addressed store, hash-verified

3083 return self._finalized
3084
3085 def finalize(self):
3086 """Finalizes this graph, making it read-only.
3087
3088 After calling `g.finalize()`, no new operations can be added to
3089 `g`. This method is used to ensure that no operations are added
3090 to a graph when it is shared between multiple threads, for example
3091 when using a `tf.compat.v1.train.QueueRunner`.
3092 """
3093 self._finalized = True
3094
3095 def _unsafe_unfinalize(self):
3096 """Opposite of `finalize`.

Callers 15

testNoGraphPollutionMethod · 0.95
testMetaGraphSaveLoadMethod · 0.95
testFinalizedMethod · 0.95
testManySavesGraphMethod · 0.95
testManyRestoresGraphMethod · 0.95
testNoGraphPollutionMethod · 0.95
test_simpleMethod · 0.45
test_stringMethod · 0.45
test_sparseMethod · 0.45
test_listMethod · 0.45
test_dictMethod · 0.45
test_dict_from_feedsMethod · 0.45

Calls

no outgoing calls

Tested by 15

testNoGraphPollutionMethod · 0.76
testMetaGraphSaveLoadMethod · 0.76
testFinalizedMethod · 0.76
testManySavesGraphMethod · 0.76
testManyRestoresGraphMethod · 0.76
testNoGraphPollutionMethod · 0.76
test_simpleMethod · 0.36
test_stringMethod · 0.36
test_sparseMethod · 0.36
test_listMethod · 0.36
test_dictMethod · 0.36
test_dict_from_feedsMethod · 0.36