Пример #1
0
 def run(self, shape):
     sampler = self.make_sampler("ancestral",
                                 temperature=FLAGS.temperature,
                                 selector=lib_sampling.OrderlessSelector())
     pianorolls, masks = self.blank_slate(shape)
     pianorolls = sampler(pianorolls, masks)
     return pianorolls
Пример #2
0
 def run(self, shape):
     pianorolls, masks = self.blank_slate(shape)
     sampler = self.make_sampler(
         "gibbs",
         masker=lib_sampling.BernoulliMasker(),
         sampler=self.make_sampler(
             "ancestral",
             selector=lib_sampling.OrderlessSelector(),
             temperature=FLAGS.temperature),
         schedule=lib_sampling.YaoSchedule())
     pianorolls = sampler(pianorolls, masks)
     return pianorolls