Variable._execution_engine.run_backward(
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [32, 50, 180]], which is output 0 of AddBackward0, is at version 2; expected version 1 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).
记录一下这个错误,查了无数博客,发现最后问题就只是一个q*=修改为q = q self.scaling就解决了
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)