def corloc(top_subproblem, labels, corloc_list):
    ntotal = tf.cast(tf.shape(top_subproblem)[(- 1)], tf.float32)
    for i in range(tf.shape(labels)[0]):
        res = batched_gather(top_subproblem[(i, ..., tf.newaxis)], labels[i])
        corloc_list.append((tf.reduce_sum(res) / ntotal))
def corloc(top_subproblem, labels, corloc_list):
    ntotal = tf.cast(tf.shape(top_subproblem)[(- 1)], tf.float32)
    for i in range(tf.shape(labels)[0]):
        res = batched_gather(top_subproblem[(i, ..., tf.newaxis)], labels[i])
        corloc_list.append((tf.reduce_sum(res) / ntotal))