shenweichen / shenweichen/DeepCTR-Torch

Error when running run_dien.py

Open
#249 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3.5k
Forks
733
PR merge metrics
No merged PRs in 30d

Description

After installation of DeepCTR via python setup.py install, I get the following error:

cuda ready...
cuda:0
Train on 4 samples, validate on 0 samples, 2 steps per epoch
0it [00:00, ?it/s]
Traceback (most recent call last):
  File "run_dien.py", line 68, in <module>
    history = model.fit(x, y, batch_size=2, epochs=10, verbose=1, validation_split=0, shuffle=False)
  File "/home/erlebach/anaconda3/envs/torch/lib/python3.8/site-packages/deepctr_torch-0.2.8-py3.8.egg/deepctr_torch/models/basemodel.py", line 245, in fit
  File "/home/erlebach/anaconda3/envs/torch/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/erlebach/anaconda3/envs/torch/lib/python3.8/site-packages/deepctr_torch-0.2.8-py3.8.egg/deepctr_torch/models/dien.py", line 92, in forward
  File "/home/erlebach/anaconda3/envs/torch/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/erlebach/anaconda3/envs/torch/lib/python3.8/site-packages/deepctr_torch-0.2.8-py3.8.egg/deepctr_torch/models/dien.py", line 220, in forward
  File "/home/erlebach/anaconda3/envs/torch/lib/python3.8/site-packages/torch/nn/utils/rnn.py", line 249, in pack_padded_sequence
    _VF._pack_padded_sequence(input, lengths, batch_first)

Any help is appreciated.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with run_dien.py, especially line 68, then inspect deepctr_torch/models/dien.py at line 220 and the PyTorch pack_padded_sequence call. The report ends before the exception message, so capture the complete error and determine whether the input lengths or other arguments cause the failure; done means the example runs successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.