import tensorflow as tf

        assert ob.name in config.optimizers, ob
        optimizer = config.optimizers[ob.name](
            include=ob.include,
            exclude=ob.exclude,
            step=trainer.step,
            log=trainer.log,
            debug=config.debug,
            name=ob.name)
        condition = tf.equal(trainer.phase, 'train')
        summary, grad_norm = optimizer.maybe_minimize(condition, ob.value)
        summaries.append(summary)
        grad_norms[ob.name] = grad_norm
    return summaries, grad_norms


def simulate_episodes(
