Commit 0287324f authored by xiabo's avatar xiabo
Browse files

dtk2210.1 torch1.8.0

parent e45bf20b
...@@ -97,11 +97,12 @@ class SAConv2d(ConvAWS2d): ...@@ -97,11 +97,12 @@ class SAConv2d(ConvAWS2d):
avg_x = F.avg_pool2d(avg_x, kernel_size=5, stride=1, padding=0) avg_x = F.avg_pool2d(avg_x, kernel_size=5, stride=1, padding=0)
switch = self.switch(avg_x) switch = self.switch(avg_x)
# sac
weight = self._get_weight(self.weight)
zero_bias = torch.zeros( zero_bias = torch.zeros(
self.out_channels, device=weight.device, dtype=weight.dtype) self.out_channels, device=weight.device, dtype=weight.dtype)
# sac
weight = self._get_weight(self.weight)
if self.use_deform: if self.use_deform:
offset = self.offset_s(avg_x) offset = self.offset_s(avg_x)
out_s = deform_conv2d(x, offset, weight, self.stride, self.padding, out_s = deform_conv2d(x, offset, weight, self.stride, self.padding,
......
...@@ -92,7 +92,7 @@ def test_forward_equal_with_pytorch_float(): ...@@ -92,7 +92,7 @@ def test_forward_equal_with_pytorch_float():
@pytest.mark.skipif( @pytest.mark.skipif(
not torch.cuda.is_available(), reason='requires CUDA support') not torch.cuda.is_available(), reason='requires CUDA support')
@pytest.mark.parametrize('channels', [4, 30, 32, 64, 71, 1025, 2048, 3096]) @pytest.mark.parametrize('channels', [4, 30, 32, 64, 71, 1025])
def test_gradient_numerical(channels, def test_gradient_numerical(channels,
grad_value=True, grad_value=True,
grad_sampling_loc=True, grad_sampling_loc=True,
......
...@@ -136,7 +136,7 @@ class Testnms(object): ...@@ -136,7 +136,7 @@ class Testnms(object):
def test_batched_nms(self): def test_batched_nms(self):
import mmcv import mmcv
from mmcv.ops import batched_nms from mmcv.ops import batched_nms
results = mmcv.load('./tests/data/batched_nms_data.pkl') results = mmcv.load('../tests/data/batched_nms_data.pkl')
nms_cfg = dict(type='nms', iou_threshold=0.7) nms_cfg = dict(type='nms', iou_threshold=0.7)
boxes, keep = batched_nms( boxes, keep = batched_nms(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment