Skip to content

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

Open
@zafercavdar

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 <module>
    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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions