TOOD icon indicating copy to clipboard operation
TOOD copied to clipboard

how to stead of deform_sampling?

Open 2anchao opened this issue 2 years ago • 1 comments

Hi Author: def deform_sampling(self, feat, offset): """ Sampling the feature x according to offset. Args: feat (Tensor): Feature offset (Tensor): Spatial offset for for feature sampliing """ # it is an equivalent implementation of bilinear interpolation b, c, h, w = feat.shape weight = feat.new_ones(c, 1, 1, 1) y = deform_conv2d(feat, offset, weight, 1, 0, 1, c, c) return y https://github.com/fcjian/TOOD/blob/master/mmdet/models/dense_heads/tood_head.py how to use bilinear interpolation stead of deform_conv2d?

2anchao avatar Aug 31 '21 01:08 2anchao

you can use grid_sample to stead of deform_conv2d

ghostxsl avatar Sep 17 '21 13:09 ghostxsl