caoyunkang / AdaCLIP

[ECCV2024] The Official Implementation for ''AdaCLIP: Adapting CLIP with Hybrid Learnable Prompts for Zero-Shot Anomaly Detection''
MIT License
138 stars 4 forks source link

cause error when try to train #2

Open jackyyang-cv opened 4 months ago

jackyyang-cv commented 4 months ago

the error is:RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.HalfTensor [1, 768]], which is output 0 of DivBackward0, is at version 1; expected version 0 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).

caoyunkang commented 4 months ago

Hi,

Thanks for your interest! Your reported issue may be caused by a different version of Torch. I suggest downgrading your Torch to version 1.10.1+cu111. Best,

jackyyang-cv commented 4 months ago

I have fix this error.

Hualiujie commented 4 months ago

I have fix this error.

Do you downgrading your Torch to version 1.10.1+cu111? Can you share your method?

Hualiujie commented 4 months ago

Hi,

Thanks for your interest! Your reported issue may be caused by a different version of Torch. I suggest downgrading your Torch to version 1.10.1+cu111. Best,

I try to downgrading my Torch to version 1.10.1+cu111, but there are many errors. Who can share your method for this Error? Thank you

Kaze816 commented 3 months ago

I have fix this error.

Do you downgrading your Torch to version 1.10.1+cu111? Can you share your method?

torch-1.13.1+cu116-cp39-cp39-win_amd64.whl wooking OK torch-2.3.0+cu118-cp39-cp39-win_amd64.whl shows the same error 只需要切换虚拟环境即可