huggingface / huggingface/torchMoji

ValueError: too many values to unpack (expected 2) error in example script

Open
#34 3 comments 3 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
920
Forks
185
PR merge metrics
No merged PRs in 30d

Description

Hi,

I have cloned the repository and downloaded weights with given script. Then I have tried to run `examples/text_emojize.py` with `--text "Today is great'" --maxlen 30`, but it gave ValueError with following traceback:

```
➜ torchMoji git:(master) python3 examples/text_emojize.py --text "Today is great!" --maxlen 30
Traceback (most recent call last):
File "examples/text_emojize.py", line 55, in
prob = model(tokenized)[0]
File "/Users/zafer/.pyenv/versions/3.6.7/lib/python3.6/site-packages/torch/nn/modules/module.py", line 547, in __call__
result = self.forward(*input, **kwargs)
File "/Users/repos/torchMoji/torchmoji/model_def.py", line 222, in forward
lstm_0_output, _ = self.lstm_0(packed_input, hidden)
File "/Users/zafer/.pyenv/versions/3.6.7/lib/python3.6/site-packages/torch/nn/modules/module.py", line 547, in __call__
result = self.forward(*input, **kwargs)
File "/Users/repos/torchMoji/torchmoji/lstm.py", line 78, in forward
input, batch_sizes = input
ValueError: too many values to unpack (expected 2)
```

My torch version is 1.2.0 and Python version is 3.6.7

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.