def _transpose_and_gather_feat(feat, ind):
    feat = feat.permute(0, 2, 3, 1).contiguous()
    feat = feat.view(feat.size(0), (- 1), feat.size(3)).contiguous()
    feat = _gather_feat(feat, ind)
    return feat.contiguous()
def _transpose_and_gather_feat(feat, ind):
    feat = feat.permute(0, 2, 3, 1).contiguous()
    feat = feat.view(feat.size(0), (- 1), feat.size(3)).contiguous()
    feat = _gather_feat(feat, ind)
    return feat.contiguous()