JihuaPeng / KTPFormer

67 stars 5 forks source link

inplace operation #8

Open hyimarm opened 4 months ago

hyimarm commented 4 months ago

RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [243, 17, 512]], which is output 0 of ReluBackward0, is at version 1; expected version 0 instead. Hint: the backtrace further above shows the operation that failed to compute its gradient. The variable in question was changed in there or anywhere later. Good luck!

hyimarm commented 4 months ago

when I run the training code

HiddenMarkovModel commented 4 months ago

I encountered the same error, have you resolve it ?

imbamaker commented 4 months ago

I also encountered this error. How could such a great model have such a mistake? I hope the excellent author can help us.

JihuaPeng commented 4 months ago

This may be a pytorch environment incompatibility problem, and you may run the code under torch1.7.1 or torch1.8.1 environment.

zhongzhaw commented 3 months ago

i run the code under 1.8.1,but "module 'torch' has no attribute 'diff'"can you help me

zhongzhaw commented 3 months ago

i run the code under 1.8.1,but "module 'torch' has no attribute 'diff'"can you help me

i have run successfully under pytorch 1.8.0

LLLYLong commented 1 month ago

i run the code under 1.8.1,but "module 'torch' has no attribute 'diff'"can you help me

i have run successfully under pytorch 1.8.0

Hi, can you tell me all the configurations that you ran successfully, such as Gpu model, cuda version, torch version?

zhongzhaw commented 1 month ago

nvidia A6000 +CUDA Version: 12.2 + torch 1.8.0

LLLYLong commented 1 month ago

nvidia A6000 +CUDA Version: 12.2 + torch 1.8.0

Thank you very much for your reply. I'm using 3090, cuda11.4, torch1.8.0, but it reports the following error: RuntimeError: CUDA error: no kernel image is available for execution on the device. i think it should be that the cuda and torch versions don't I think cuda and torch versions don't match, normally, cuda12.2 should have a higher version, and it should have the problem, too.