import tensorflow as tf

    for ob in processed:
        if ob.include == r'.*' and ob.exclude is None:
            assert ob.goal == min
            losses.append(ob.value)
        else:
            objectives.append(ob)
    objectives.append(Objective('main', tf.reduce_sum(losses), min, r'.*', None))
    # Apply optimizers and collect loss summaries.
    summaries = []
    grad_norms = {}

    # for ob in processed:
