Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example error run_classification_criteo.py #102

Closed
xinyu009 opened this issue Aug 4, 2020 · 3 comments
Closed

Example error run_classification_criteo.py #102

xinyu009 opened this issue Aug 4, 2020 · 3 comments

Comments

@xinyu009
Copy link

xinyu009 commented Aug 4, 2020

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:

  1. 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.

@huanhuancao
Copy link

Hello! Have you solved the problem?

@diff7
Copy link

diff7 commented Sep 14, 2020

same problem

@shenweichen
Copy link
Owner

we have solved this issue in new version , please use pip install -U deepctr-torch to upgrade.

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

No branches or pull requests

4 participants