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

Loading word2vec embedding exceeds the memory limit #807

Open
danielwonght opened this issue Nov 26, 2019 · 2 comments
Open

Loading word2vec embedding exceeds the memory limit #807

danielwonght opened this issue Nov 26, 2019 · 2 comments
Labels

Comments

@danielwonght
Copy link

Describe the bug

Loading word2vec embedding causes the memory issue. Loading embedding vector in string format require much more memory.

Solution

Modify the function matchzoo.embedding.load_from_file from:

data = pd.read_csv(file_path,
sep=" ",
index_col=0,
header=None,
skiprows=1)

to:

data = pd.read_csv(file_path,
sep=" ",
index_col=0,
header=None,
skiprows=1,
quoting=csv.QUOTE_NONE)

@bwanglzu
Copy link
Member

would you like to send a PR to fix this issue? @danielwonght

@danielwonght
Copy link
Author

Sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants