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

UnpicklingError: invalid load key, '<'. #9

Closed
ShrikanthSingh opened this issue Feb 26, 2020 · 3 comments
Closed

UnpicklingError: invalid load key, '<'. #9

ShrikanthSingh opened this issue Feb 26, 2020 · 3 comments

Comments

@ShrikanthSingh
Copy link

The code snippet I used :

from textaugment import Word2vec
t = Word2vec(model='/content/drive/My Drive/ewiki8/enwik9')
#t.augment('The stories are good')
@JosephSefara
Copy link
Collaborator

The problem might be how you saved your model. See. Try building the model in the same notebook and test.

@ShrikanthSingh
Copy link
Author

The problem might be how you saved your model. See. Try building the model in the same notebook and test.

I tried even loading the ' Google News from Google drive' but it throws error UnpicklingError: invalid load key, '3'.

@JosephSefara
Copy link
Collaborator

Model not trained using Gensim you have to load it using this code then pass that model:
E.g

from gensim.models import Word2Vec
model = Word2Vec.load_word2vec_format('GoogleNews-vectors-negative300.bin', binary=True, norm_only=True)
from textaugment import Word2vec
t = Word2vec(model=model)

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