Copy the values of all variables from the given network, including sub-networks.
(self, src_net: "Network")
| 321 | tfutil.set_vars(tfutil.run({self.vars[name]: src_net.vars[name] for name in names})) |
| 322 | |
| 323 | def copy_vars_from(self, src_net: "Network") -> None: |
| 324 | """Copy the values of all variables from the given network, including sub-networks.""" |
| 325 | names = [name for name in self.vars.keys() if name in src_net.vars] |
| 326 | tfutil.set_vars(tfutil.run({self.vars[name]: src_net.vars[name] for name in names})) |
| 327 | |
| 328 | def copy_trainables_from(self, src_net: "Network") -> None: |
| 329 | """Copy the values of all trainable variables from the given network, including sub-networks.""" |