Atten4Vis / ConditionalDETR

This repository is an official implementation of the ICCV 2021 paper "Conditional DETR for Fast Training Convergence". (https://arxiv.org/abs/2108.06152)
Apache License 2.0
358 stars 48 forks source link

cannot import name '_LinearWithBias' from 'torch.nn.modules.linear' #18

Open cxq1 opened 2 years ago

cxq1 commented 2 years ago

cannot import name '_LinearWithBias' from 'torch.nn.modules.linear'

DeppMeng commented 2 years ago

It is possibly caused by incompatible PyTorch version. Which PyTorch version do you use?

cxq1 commented 2 years ago

It is possibly caused by incompatible PyTorch version. Which PyTorch version do you use?

'1.10.1

DeppMeng commented 2 years ago

We use PyTorch 1.7 to run all the experiments. I think PT 1.7.0-1.8.0 will be fine. PT 1.9+ are untested.

Li-Qingyun commented 2 years ago

@DeppMeng Is there an extra 's' on the line 30 of models/attention.py ? _LinearWithBiass or _LinearWithBias ?

DeppMeng commented 2 years ago

@Li-Qingyun Thank you for pointing out, the issue is fixed.