INNER CODE UNIT · Python

train

HyperGAN/HyperGAN · hypergan/cli.py:142

    def train(self):
        i=0
        if(self.args.ipython):
            import fcntl
            fd = sys.stdin.fileno()
            fl = fcntl.fcntl(fd, fcntl.F_GETFL)
            fcntl.fcntl(fd, fcntl.F_SETFL, fl | os.O_NONBLOCK)

        self.gan = hg.GAN(config=self.gan_config, inputs=self.create_input(), device=self.args.parameter_server_device)
        self.gan.cli = self #TODO remove this link
        self.gan.inputs.next()
        self.lazy_create()

        self.trainable_gan = hg.TrainableGAN(self.gan, save_file = self.save_file, devices = self.devices, backend_name = self.args.backend)

        if self.trainable_gan.load():
            print("Model loaded")
        else:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…