def _transpose(training_targets, num_loc_list):
    '''
    This function is used to transpose image first training targets to 
        level first ones
    :return: level first training targets
    '''
    for im_i in range(len(training_targets)):
        training_targets[im_i] = torch.split(
            training_targets[im_i], num_loc_list, dim=0)

    targets_level_first = []
    for targets_per_level in zip(*training_targets):
        targets_level_first.append(
            torch.cat(targets_per_level, dim=0))
    return targets_level_first

    This function is used to transpose image first training targets to 
        level first ones
    :return: level first training targets
    
iGPT/models/grit_src/third_party/CenterNet2/projects/CenterNet2/centernet/modeling/dense_heads/utils.py