INNER CODE UNIT · Python

lazy_create

HyperGAN/HyperGAN · hypergan/cli.py:69

    def lazy_create(self):
        if(self.sampler == None):
            self.sampler = self.gan.sampler_for(self.sampler_name)(self.gan, samples_per_row=self.args.width)
            if(self.sampler == None):
                raise ValidationException("No sampler found by the name '"+self.sampler_name+"'")

    def step(self):
        self.steps+=1
        self.trainable_gan.step()

        if(self.steps % self.sample_every == 0):
            sample_list = self.trainable_gan.sample(self.sampler, self.sample_path)

    def create_path(self, filename):
        return os.makedirs(os.path.expanduser(os.path.dirname(filename)), exist_ok=True)

    def create_input(self, blank=False, rank=None):
        klass = GANComponent.lookup_function(None, self.input_config['class'])

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…