Pytorch nms implementation. The proposal is rejected if the IoU crosses the threshold.