Clamp将超出范围的数据规范为边界值 例如将deformable conv中学习到的坐标,超出featuremap的部分规范为featuremap(e.g., 5x5)的h/w q_lt clamp p_x = torch.clamp(q_lt[..., :N], 0, x.size(2)-1) p_y = torch.clamp(q_lt[..., N:], 0, x.size(3)-1) q_lt = torch.cat([p_x, p_y], dim=-1).long()