MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / restore_collection

Function restore_collection

tensorpack/tfutils/collection.py:37–46  ·  view source on GitHub ↗

Restore from a collection backup. Args: backup (dict):

(backup)

Source from the content-addressed store, hash-verified

35
36
37def restore_collection(backup):
38 """
39 Restore from a collection backup.
40
41 Args:
42 backup (dict):
43 """
44 for k, v in six.iteritems(backup):
45 del tf.get_collection_ref(k)[:]
46 tf.get_collection_ref(k).extend(v)
47
48
49@contextmanager

Callers 5

post_process_modelMethod · 0.85
BatchNormFunction · 0.85
BatchRenormFunction · 0.85
freeze_collectionFunction · 0.85
_restore_freezeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected