ConditionalDETR icon indicating copy to clipboard operation
ConditionalDETR copied to clipboard

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

Open ZiMo-Chen opened this issue 3 years ago • 5 comments

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

ZiMo-Chen avatar Mar 25 '22 08:03 ZiMo-Chen

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

DeppMeng avatar Apr 01 '22 02:04 DeppMeng

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

'1.10.1

ZiMo-Chen avatar Apr 01 '22 02:04 ZiMo-Chen

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.

DeppMeng avatar Apr 01 '22 02:04 DeppMeng

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

Li-Qingyun avatar Jun 13 '22 00:06 Li-Qingyun

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

DeppMeng avatar Jun 13 '22 15:06 DeppMeng