LeapLabTHU/DAT

an unused parameters for class TransformerStage:"ns_per_pt" and "sr_ratio"

fppccc opened this issue · 1 comments

Hello,I found an unused parameters "ns_per_pt" and "sr_ratio",I was wondering what is it used for?
Thank you very much!

class TransformerStage(nn.Module):
def init(self, fmap_size, window_size, ns_per_pt,
dim_in, dim_embed, depths, stage_spec, n_groups,
use_pe, sr_ratio,
heads, stride, offset_range_factor, stage_idx,
dwc_pe, no_off, fixed_pe,
attn_drop, proj_drop, expansion, drop, drop_path_rate, use_dwc_mlp):

Hello @fppccc,

The ns_per_pt parameter is used in the initial versions of DAT, to indicate the number ofsampling points to each query. In the later version of DAT model, I find that the size of key and value feature maps can obtain this number. This can also be useful to construct some model like Deformable DETR or local version of DAT, however, they have not been developed yet.

The sr_ratio is SRA block in Pyramid Vision Transformer (PVT / PVTv2), which is used in the updated code of DAT++. DAT++ is the extended version to DAT of CVPR 2022.