INNER CODE UNIT · Python
run
HyperGAN/HyperGAN · hypergan/cli.py:214
def run(self):
if self.method == 'train':
self.train()
elif self.method == 'build':
self.gan = hg.GAN(config=self.gan_config, inputs=self.create_input(blank=True))
if not self.gan.load(self.save_file):
raise ValidationException("Could not load model: "+ self.save_file)
self.build()
elif self.method == 'new':
self.new()
elif self.method == 'sample':
self.gan = hg.GAN(config=self.gan_config, inputs=self.create_input(blank=False))
if not self.gan.load(self.save_file):
print("Initializing new model")
self.sample_forever()