mirror of
https://github.com/open-mmlab/mmsegmentation.git
synced 2025-06-03 22:03:48 +08:00
## Motivation Original motivation was after [MMDetection PR #9533](https://github.com/open-mmlab/mmdetection/pull/9533) With several experiments I found out that if a ndarray is contiguous, numpy.transpose + torch.contiguous perform better, while if not, then use numpy.ascontiguousarray + numpy.transpose ## Modification Replace numpy.ascontiguousarray with torch.contiguous in [PackSegInputs](https://github.com/open-mmlab/mmsegmentation/blob/1.x/mmseg/datasets/transforms/formatting.py) Co-authored-by: MeowZheng <meowzheng@outlook.com>