From 37ed9af80bd0d64113db5c06a2042c68620cb64a Mon Sep 17 00:00:00 2001 From: luochunhua Date: Thu, 27 Jan 2022 08:39:08 +0000 Subject: [PATCH 1/5] add comments for bbox clamp --- mmdet/models/dense_heads/autoassign_head.py | 3 +++ mmdet/models/dense_heads/fcos_head.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/mmdet/models/dense_heads/autoassign_head.py b/mmdet/models/dense_heads/autoassign_head.py index 347c9b1f9d7..446da244b9e 100644 --- a/mmdet/models/dense_heads/autoassign_head.py +++ b/mmdet/models/dense_heads/autoassign_head.py @@ -197,6 +197,9 @@ def forward_single(self, x, scale, stride): # scale the bbox_pred of different level # float to avoid overflow when enabling FP16 bbox_pred = scale(bbox_pred).float() + # bbox_pred needed for gradient computation has been modified + # by F.relu(bbox_pred) when run with PyTorch 1.10. So replace + # F.relu(bbox_pred) with bbox_pred.clamp(min=0) bbox_pred = bbox_pred.clamp(min=0) bbox_pred *= stride return cls_score, bbox_pred, centerness diff --git a/mmdet/models/dense_heads/fcos_head.py b/mmdet/models/dense_heads/fcos_head.py index 8d8b85a6237..d72fb56caa1 100644 --- a/mmdet/models/dense_heads/fcos_head.py +++ b/mmdet/models/dense_heads/fcos_head.py @@ -154,6 +154,9 @@ def forward_single(self, x, scale, stride): # float to avoid overflow when enabling FP16 bbox_pred = scale(bbox_pred).float() if self.norm_on_bbox: + # bbox_pred needed for gradient computation has been modified + # by F.relu(bbox_pred) when run with PyTorch 1.10. So replace + # F.relu(bbox_pred) with bbox_pred.clamp(min=0) bbox_pred = bbox_pred.clamp(min=0) if not self.training: bbox_pred *= stride From 49fb27f91f77d066bfacfc8a276b9e7fdc75ddfc Mon Sep 17 00:00:00 2001 From: luochunhua Date: Thu, 27 Jan 2022 08:51:54 +0000 Subject: [PATCH 2/5] add CI of pytorch1.10 --- .github/workflows/build.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4666f244981..ab76c0b0f26 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,7 +33,7 @@ jobs: strategy: matrix: python-version: [3.7] - torch: [1.5.1, 1.6.0, 1.7.0, 1.8.0, 1.9.0] + torch: [1.5.1, 1.6.0, 1.7.0, 1.8.0, 1.9.0, 1.10.0] include: - torch: 1.5.1 torchvision: 0.6.1 @@ -50,6 +50,9 @@ jobs: - torch: 1.9.0 torchvision: 0.10.0 mmcv: 1.9.0 + - torch: 1.10.0 + torchvision: 0.11.2 + mmcv: 1.10.0 steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} @@ -160,12 +163,16 @@ jobs: strategy: matrix: python-version: [3.6, 3.7, 3.8, 3.9] - torch: [1.9.0+cu102] + torch: [1.9.0+cu102, 1.10.0+cu102] include: - torch: 1.9.0+cu102 torch_version: torch1.9.0 torchvision: 0.10.0+cu102 mmcv: 1.9.0 + - torch: 1.10.0+cu102 + torch_version: torch1.10.0 + torchvision: 0.11.2+cu102 + mmcv: 1.10.0 steps: - uses: actions/checkout@v2 From 7e6fe7e5f51bf32d03b2ad36f7a3803730f37ce4 Mon Sep 17 00:00:00 2001 From: luochunhua Date: Thu, 27 Jan 2022 09:07:40 +0000 Subject: [PATCH 3/5] add ci of pytorch1.10.1 --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ab76c0b0f26..adab09464af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,7 +33,7 @@ jobs: strategy: matrix: python-version: [3.7] - torch: [1.5.1, 1.6.0, 1.7.0, 1.8.0, 1.9.0, 1.10.0] + torch: [1.5.1, 1.6.0, 1.7.0, 1.8.0, 1.9.0, 1.10.1] include: - torch: 1.5.1 torchvision: 0.6.1 @@ -50,7 +50,7 @@ jobs: - torch: 1.9.0 torchvision: 0.10.0 mmcv: 1.9.0 - - torch: 1.10.0 + - torch: 1.10.1 torchvision: 0.11.2 mmcv: 1.10.0 steps: @@ -163,14 +163,14 @@ jobs: strategy: matrix: python-version: [3.6, 3.7, 3.8, 3.9] - torch: [1.9.0+cu102, 1.10.0+cu102] + torch: [1.9.0+cu102, 1.10.1+cu102] include: - torch: 1.9.0+cu102 torch_version: torch1.9.0 torchvision: 0.10.0+cu102 mmcv: 1.9.0 - - torch: 1.10.0+cu102 - torch_version: torch1.10.0 + - torch: 1.10.1+cu102 + torch_version: torch1.10.1 torchvision: 0.11.2+cu102 mmcv: 1.10.0 From f14dadb964661b8e69a5fdbbda56f32e2f472acd Mon Sep 17 00:00:00 2001 From: luochunhua Date: Thu, 10 Feb 2022 20:03:16 +0800 Subject: [PATCH 4/5] mmcv1.9.0->mmcv1.9 --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index adab09464af..a33ec6e1be4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,7 +49,7 @@ jobs: mmcv: 1.8.0 - torch: 1.9.0 torchvision: 0.10.0 - mmcv: 1.9.0 + mmcv: 1.9 - torch: 1.10.1 torchvision: 0.11.2 mmcv: 1.10.0 @@ -168,7 +168,7 @@ jobs: - torch: 1.9.0+cu102 torch_version: torch1.9.0 torchvision: 0.10.0+cu102 - mmcv: 1.9.0 + mmcv: 1.9 - torch: 1.10.1+cu102 torch_version: torch1.10.1 torchvision: 0.11.2+cu102 From 1d3e5f95732078c266efda767e4dec19a9be2862 Mon Sep 17 00:00:00 2001 From: luochunhua Date: Thu, 10 Feb 2022 21:09:09 +0800 Subject: [PATCH 5/5] add ci of pytorch1.10 --- .github/workflows/build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5ed4f883404..85ad6be0a69 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,6 +50,9 @@ jobs: - torch: 1.9.0 torchvision: 0.10.0 mmcv: 1.9 + - torch: 1.10.1 + torchvision: 0.11.2 + mmcv: 1.10 steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} @@ -166,6 +169,10 @@ jobs: torch_version: torch1.9.0 torchvision: 0.10.0+cu102 mmcv: 1.9 + - torch: 1.10.1+cu102 + torch_version: torch1.10.1 + torchvision: 0.11.2+cu102 + mmcv: 1.10 steps: - uses: actions/checkout@v2