def reset_vars(self) -> None:
        """Re-initialize all variables of this network, including sub-networks."""
        if self._var_inits is None:
            tfutil.run([var.initializer for var in self._get_vars().values()])
        else:
            self._var_inits.clear()
            self._all_inits_known = False
            if self._components is not None:
                for comp in self._components.values():
                    comp.reset_vars()
Re-initialize all variables of this network, including sub-networks.
converters/stylegan2ada_tf_official/dnnlib/tflib/network.py