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

Function freeze_collection

tensorpack/tfutils/collection.py:50–60  ·  view source on GitHub ↗

Args: keys(list): list of collection keys to freeze. Returns: a context where the collections are in the end restored to its initial state.

(keys)

Source from the content-addressed store, hash-verified

48
49@contextmanager
50def freeze_collection(keys):
51 """
52 Args:
53 keys(list): list of collection keys to freeze.
54
55 Returns:
56 a context where the collections are in the end restored to its initial state.
57 """
58 backup = backup_collection(keys)
59 yield
60 restore_collection(backup)
61
62
63@memoized

Callers

nothing calls this directly

Calls 2

backup_collectionFunction · 0.85
restore_collectionFunction · 0.85

Tested by

no test coverage detected