mae_segmentation icon indicating copy to clipboard operation
mae_segmentation copied to clipboard

执行训练脚本时报错,不知道是否为torch版本的原因

Open littletomatodonkey opened this issue 2 years ago • 0 comments

你好,想问下项目代码运行的torch版本是多少呢?

我使用torch==1.10.0,有以下的错误,把continuous操作修改为clone以及relu修改为inplace=False,还是会报相同的问题(训练的过程中,我设置了use_fp16=False)

RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [2, 768, 32, 32]], which is output 0 of ReluBackward0, 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).

littletomatodonkey avatar May 16 '23 09:05 littletomatodonkey