RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation 我在计算loss的过程中,遇到了以上错误 原因1:浅复制搞的鬼 出错代码1: temp = target 正确代码1: temp = target.clone() 出错代码2: output1[:, 0, :