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

error in videos/seq2seq/train.py #74

Open
alexandrovsky opened this issue Sep 28, 2022 · 1 comment
Open

error in videos/seq2seq/train.py #74

alexandrovsky opened this issue Sep 28, 2022 · 1 comment

Comments

@alexandrovsky
Copy link

Hi, when I run train.py, I get the following error:

Traceback (most recent call last): File "wandb-tutorials/ml-class/videos/seq2seq/train.py", line 131, in <module> guess = ctable.decode(preds[0], calc_argmax=False) File "wandb-tutorials/ml-class/videos/seq2seq/train.py", line 41, in decode return ''.join(self.indices_char[x] for x in x) File "wandb-tutorials/ml-class/videos/seq2seq/train.py", line 41, in <genexpr> return ''.join(self.indices_char[x] for x in x) TypeError: unhashable type: 'numpy.ndarray'

Any ideas how to fix this?

@thisisvk45
Copy link

The error occurs because a numpy.ndarray is being used as an index, which isn't allowed. To fix it, flatten the array and convert it to a list of indices before decoding. Adjust the decode method to handle numpy.ndarray correctly.

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

2 participants