Describe the bug(问题描述)
A clear and concise description of what the bug is.
cuda ready...
cuda:0
Train on 160 samples, validate on 0 samples, 5 steps per epoch
Traceback (most recent call last):
File "run_classification_criteo.py", line 62, in
batch_size=32, epochs=10, validation_split=0.0, verbose=2)
File "/home/xinyu/anaconda3/lib/python3.7/site-packages/deepctr_torch/models/basemodel.py", line 224, in fit
total_loss.backward(retain_graph=True)
File "/home/xinyu/anaconda3/lib/python3.7/site-packages/torch/tensor.py", line 198, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "/home/xinyu/anaconda3/lib/python3.7/site-packages/torch/autograd/init.py", line 100, in backward
allow_unreachable=True) # allow_unreachable flag
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [128]], which is output 0 of SelectBackward, 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).
To Reproduce(复现步骤)
Steps to reproduce the behavior:
Just run run_classification_criteo.py
Operating environment(运行环境):
python version [3.7]
torch version [1.5.0]
Additional context
Add any other context about the problem here.
Describe the bug(问题描述) A clear and concise description of what the bug is. cuda ready... cuda:0 Train on 160 samples, validate on 0 samples, 5 steps per epoch Traceback (most recent call last): File "run_classification_criteo.py", line 62, in
batch_size=32, epochs=10, validation_split=0.0, verbose=2)
File "/home/xinyu/anaconda3/lib/python3.7/site-packages/deepctr_torch/models/basemodel.py", line 224, in fit
total_loss.backward(retain_graph=True)
File "/home/xinyu/anaconda3/lib/python3.7/site-packages/torch/tensor.py", line 198, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "/home/xinyu/anaconda3/lib/python3.7/site-packages/torch/autograd/init.py", line 100, in backward
allow_unreachable=True) # allow_unreachable flag
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [128]], which is output 0 of SelectBackward, 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).
To Reproduce(复现步骤) Steps to reproduce the behavior:
Operating environment(运行环境):
Additional context Add any other context about the problem here.