MCPcopy Create free account
hub / github.com/LynnHo/EigenGAN-Tensorflow / clone_from_module

Method clone_from_module

tflib/deep_learning/module.py:62–71  ·  view source on GitHub ↗
(self, src_module, var_type='all')

Source from the content-addressed store, hash-verified

60 return clone_ops
61
62 def clone_from_module(self, src_module, var_type='all'):
63 assert var_type in ['all', 'trainable', 'nontrainable']
64 assert type(self) == type(src_module), 'The types of the target module and the source module are inconsistent!'
65 assert self._is_built, 'The target module should be already built (called at least once)!'
66 assert src_module._is_built, 'The source module should be already built (called at least once)!'
67
68 src_vars = {'all': src_module.variables, 'trainable': src_module.trainable_variables, 'nontrainable': src_module.nontrainable_variables}[var_type]
69 clone_ops = self.clone_from_vars(src_vars, var_type=var_type)
70
71 return clone_ops
72
73 @property
74 def scope(self):

Callers 1

clone_graphFunction · 0.80

Calls 1

clone_from_varsMethod · 0.95

Tested by

no test coverage detected