(self, src_net: "Network")
Copy the values of all trainable variables from the given network, including sub-networks.
Copy the values of all trainable variables from the given network, including sub-networks.
Copy the values of all trainable variables from the given network including sub - networks .
def copy_trainables_from(self, src_net: "Network") -> None:
        """Copy the values of all trainable variables from the given network, including sub-networks."""
        names = [name for name in self.trainables.keys() if name in src_net.trainables]
        tfutil.set_vars(tfutil.run({self.vars[name]: src_net.vars[name] for name in names}))
def copy_trainables_from ( self , src_net : "Network" ) -> None : names = [ name for name in self . trainables . keys ( ) if name in src_net . trainables ] tfutil . set_vars ( tfutil . run ( { self . vars [ name ] : src_net . vars [ name ] for name in names } ) )