aim-uofa / AdelaiDet

AdelaiDet is an open source toolbox for multiple instance-level detection and recognition tasks.

Home Page:https://git.io/AdelaiDet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How do we understand '_C' in adet?

IncludeMathH opened this issue · comments

Sometimes you see snippets of code like this: DETR

from adet import _C
...
class _MSDeformAttnFunction(torch.autograd.Function):
    @staticmethod
    def forward(ctx, value, value_spatial_shapes, value_level_start_index, sampling_locations, attention_weights, im2col_step):

        output = _C.ms_deform_attn_forward(
            value, value_spatial_shapes, value_level_start_index, sampling_locations, attention_weights, ctx.im2col_step)

So what exactly does _C stand for? Where is the source code for this part?

hi ! same confusion,canyou talk about your views thanks!

According to my understanding, this _C represents some programs written in CUDA language. In the DETR I described, the relevant files are in the csrc folder.

thanks you!you are so warmhearted, and i try to export a model based detr into torchscript,but met some problem, have you export the model into other format (like onnx,torchscript etc.) before? i want to find some help from someone who is experienced.

没有试过,我也只是初学者。