'Setup graph for SimpleTrainer. It simply build one tower and optimize `model.cost`.
Args:
model (ModelDesc):
input (InputSource):
Returns:
tf.Operation: the training op
[Callback]: the callbacks to be added'

@staticmethod
def setup_graph(model, input):

    cbs = input.setup(model.get_inputs_desc())
    with TowerContext('', is_training=True):
        model.build_graph(input)
        (_, grads) = model.get_cost_and_grad()
    opt = model.get_optimizer()
    train_op = opt.apply_gradients(grads, name='min_op')
    return (train_op, cbs)
