pytoch,使用resnet训练mnist数据集时报错,求大佬帮解决

RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [128, 2048, 7, 7]], which is output 0 of ReluBackward0, is at version 3; 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).
 

你可能感兴趣的:(深度学习,pytorch,python)