TOOD
TOOD copied to clipboard
how to stead of deform_sampling?
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?
you can use grid_sample to stead of deform_conv2d