Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DETRTracking: forward() takes from 2 to 3 positional arguments but 4 were given #138

Open
Linnicorn opened this issue Nov 16, 2024 · 0 comments

Comments

@Linnicorn
Copy link

DETRTracking: forward() takes from 2 to 3 positional arguments but 4 were given

  1. Since the CUDA environment in server is not configured, the MultiScaleDeformableAttention cannot be installed. So I used DETRTracking:
class DETRTracking(DETRTrackingBase, DETR):
    def __init__(self, tracking_kwargs, detr_kwargs):
        DETR.__init__(self, **detr_kwargs)
        DETRTrackingBase.__init__(self, **tracking_kwargs)
  1. However, the following error occurred:
TypeError: forward() takes from 2 to 3 positional arguments but 4 were given

The error occurred in forward function of 'DETRTrackingBase' class: ('detr_tracking.py' line276)

out, targets, features, memory, hs  = super().forward(samples, targets, prev_features)

I find that the forward function of the parent class DETR is:

def forward(self, samples: NestedTensor, targets: list = None):

which can only take from 2 to 3 positional arguments, but gives 4 ("prev_features" is addition).

Expected behavior:

Is there a corrected DTER for TrackFormer?

@Linnicorn Linnicorn changed the title Please read & provide the following DETRTracking: forward() takes from 2 to 3 positional arguments but 4 were given Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant