def _step(self, feed_dict):
    gan = self.gan
    sess = gan.session
    config = self.config
    loss = (self.loss or gan.loss)
    metrics = loss.metrics
    generator = gan.generator
    (d_loss, g_loss) = loss.sample
    winners = []
    for i in range(len(generator.parents)):
        child_count = generator.config.child_count
        choices = self.measure_g[(i * child_count):((i + 1) * child_count)]
        choice = np.argmax(sess.run(choices))
        winner = ((i * child_count) + choice)
        self.hist[winner] += 1
        winners.append(winner)
    sess.run([self.update_parent[winner] for winner in winners])
    for i in range((config.d_update_steps or 1)):
        sess.run(self.d_optimizer)
    sess.run(self.clone_parent)
    for i in range((config.g_update_steps or 1)):
        sess.run(self.g_optimizer)
    measure_g = sess.run(self.measure_g)
    if ((self.current_step % 100) == 0):
        hist_output = ('  ' + ''.join([(((('G' + str(i)) + ':') + str(v)) + ' ') for (i, v) in enumerate(self.hist)]))
        metric_values = sess.run(self.output_variables(metrics), feed_dict)
        print(str(((self.output_string(metrics) % tuple(([self.current_step] + metric_values))) + hist_output)))
        self.hist = [0 for i in range(len(self.gan.generator.children))]
def _step(self, feed_dict):
    gan = self.gan
    sess = gan.session
    config = self.config
    loss = (self.loss or gan.loss)
    metrics = loss.metrics
    generator = gan.generator
    (d_loss, g_loss) = loss.sample
    winners = []
    for i in range(len(generator.parents)):
        child_count = generator.config.child_count
        choices = self.measure_g[(i * child_count):((i + 1) * child_count)]
        choice = np.argmax(sess.run(choices))
        winner = ((i * child_count) + choice)
        self.hist[winner] += 1
        winners.append(winner)
    sess.run([self.update_parent[winner] for winner in winners])
    for i in range((config.d_update_steps or 1)):
        sess.run(self.d_optimizer)
    sess.run(self.clone_parent)
    for i in range((config.g_update_steps or 1)):
        sess.run(self.g_optimizer)
    measure_g = sess.run(self.measure_g)
    if ((self.current_step % 100) == 0):
        hist_output = ('  ' + .join([(((('G' + str(i)) + ':') + str(v)) + ' ') for (i, v) in enumerate(self.hist)]))
        metric_values = sess.run(self.output_variables(metrics), feed_dict)
        print(str(((self.output_string(metrics) % tuple(([self.current_step] + metric_values))) + hist_output)))
        self.hist = [0 for i in range(len(self.gan.generator.children))]