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

Java Heap space error #33

Open
AbhiMangal opened this issue Nov 19, 2015 · 7 comments
Open

Java Heap space error #33

AbhiMangal opened this issue Nov 19, 2015 · 7 comments

Comments

@AbhiMangal
Copy link

Sir Please tell me when i am increase the size of file dataset which i want to use for training neural network. then i am facing the exception :
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.lang.String.substring(String.java:1956)
at java.lang.String.split(String.java:2340)
at java.lang.String.split(String.java:2409)
at word2vector.Word2VecExamples$1.apply(Word2VecExamples.java:51)
at word2vector.Word2VecExamples$1.apply(Word2VecExamples.java:48)
at com.google.common.collect.Lists$TransformingRandomAccessList$1.transform(Lists.java:617)
at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
at com.google.common.collect.Iterators$5.hasNext(Iterators.java:548)
at word2vector.Word2VecTrainer.count(Word2VecTrainer.java:43)
at word2vector.Word2VecTrainer.train(Word2VecTrainer.java:77)
at word2vector.Word2VecTrainerBuilder.train(Word2VecTrainerBuilder.java:243)
at word2vector.Word2VecExamples.demoWord(Word2VecExamples.java:69)
at word2vector.Word2VecExamples.main(Word2VecExamples.java:36)

please tell me what should i am doing to remove this error.

@guerda
Copy link
Contributor

guerda commented Nov 19, 2015

Try to Google Java OutOfMemory error.

@AbhiMangal
Copy link
Author

thanks..

@AbhiMangal
Copy link
Author

sir how can i reduce the time to train the neural network . when i use very big file to train the model?
please reply me as soon as possible.

@guerda
Copy link
Contributor

guerda commented Nov 20, 2015

Try increasing fast memory and add additional CPUs. This will increase performance of the training.

@AbhiMangal
Copy link
Author

may i use for it multithreading.?

@guerda
Copy link
Contributor

guerda commented Nov 20, 2015

This word2vec implementation uses multi threading wherever possible. You can configure how many threads are used.

@XiyunLiu
Copy link

XiyunLiu commented Jul 28, 2016

How large the file you are training on? I am facing the same issue. I think the iterator should help save a lot of memory, but not.

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

No branches or pull requests

3 participants