Skip to content

replace out+=residual with out=out+residual#3

Open
QingYunA wants to merge 2 commits into
iMED-Lab:mainfrom
QingYunA:main
Open

replace out+=residual with out=out+residual#3
QingYunA wants to merge 2 commits into
iMED-Lab:mainfrom
QingYunA:main

Conversation

@QingYunA

Copy link
Copy Markdown

out+=residual is a inplace operation which will cause erros below (pytorch version : 1.13.1),use output=output+residual can solve this error.

RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [4, 32, 64, 64, 64]], 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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant