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

[Question]How to load GoogleNews-vectors-negative300.bin? #12

Open
JieZou1 opened this issue Aug 11, 2016 · 1 comment
Open

[Question]How to load GoogleNews-vectors-negative300.bin? #12

JieZou1 opened this issue Aug 11, 2016 · 1 comment

Comments

@JieZou1
Copy link

JieZou1 commented Aug 11, 2016

Hi,

I am trying to load the default model, GoogleNews-vectors-negative300.bin.

I have been using the following simple codes,

Word2Vec.Net.Distance distance = new Word2Vec.Net.Distance("GoogleNews-vectors-negative300.bin");

But, I received the following error message:

System.OutOfMemoryException: Array dimensions exceeded supported range.

Any ideas? Many Thanks.
Jie

@JieZou1 JieZou1 changed the title [Question]How to load GoogleNews-vectors-negative300.bin.gz? [Question]How to load GoogleNews-vectors-negative300.bin? Aug 11, 2016
@GuntaButya
Copy link

GuntaButya commented Dec 14, 2016

2GB is the max Memory Size for an Object, you will need to split the Dataset, or use a smaller one.
See: http://stackoverflow.com/questions/982051/net-max-memory-use-2gb-even-for-x64-assemblies

long memory = GC.GetTotalMemory(false);
// Load your DataSet...
Console.WriteLine(String.Format(CultureInfo.InvariantCulture, "Corpus Memory Use: {0:0.0} G-bytes", ((Convert.ToDouble(totalMem) / 1024.0) / 1024.0) / 1024.0));

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