MCPcopy Create free account
hub / github.com/VITA-Group/TransGAN / persistent_class

Function persistent_class

torch_utils/persistence.py:35–130  ·  view source on GitHub ↗

r"""Class decorator that extends a given class to save its source code when pickled. Example: from torch_utils import persistence @persistence.persistent_class class MyNetwork(torch.nn.Module): def __init__(self, num_inputs, num_outputs):

(orig_class)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

Calls 2

is_persistentFunction · 0.85
_module_to_srcFunction · 0.85

Tested by

no test coverage detected