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

Keyerror: '0' in w2v feature extraction #9

Open
jiminbot20 opened this issue Oct 12, 2021 · 0 comments
Open

Keyerror: '0' in w2v feature extraction #9

jiminbot20 opened this issue Oct 12, 2021 · 0 comments

Comments

@jiminbot20
Copy link

features = activations[-1].cpu().detach().numpy()

activation is dictionary. so it indexing this way does not work (activations[-1])

so I changed some into line below

features = list(activations.values())[-1].cpu().detach().numpy()

you might change indexing making into list or indexing name of the key

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

1 participant