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.lang.OutOfMemoryError: Java heap space #10

Open
haroldfry opened this issue Mar 1, 2018 · 1 comment
Open

java.lang.OutOfMemoryError: Java heap space #10

haroldfry opened this issue Mar 1, 2018 · 1 comment

Comments

@haroldfry
Copy link

haroldfry commented Mar 1, 2018

Hi, I got this error when I was trying to train a font with a language model trained on large corpus (over 200MB). The language model created is around 43MB and the initialized font is around 57MB. I have no problem using the software with a smaller size corpus. Any idea how to fix the problem?

Initializing EmissionModel 2018/02/28 22:34:49
Rebuilding cache 2018/02/28 22:34:49
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.simontuffs.onejar.Boot.run(Boot.java:340)
at com.simontuffs.onejar.Boot.main(Boot.java:166)
Caused by: java.lang.OutOfMemoryError: Java heap space
at edu.berkeley.cs.nlp.ocular.model.emission.CachingEmissionModel.rebuildCache(CachingEmissionModel.java:281)
at edu.berkeley.cs.nlp.ocular.model.DecoderEM.computeEStep(DecoderEM.java:91)
at edu.berkeley.cs.nlp.ocular.train.FontTrainer.doFontTrainPass(FontTrainer.java:185)
at edu.berkeley.cs.nlp.ocular.train.FontTrainer.trainFont(FontTrainer.java:95)
at edu.berkeley.cs.nlp.ocular.main.TrainFont.run(TrainFont.java:76)
at edu.berkeley.cs.nlp.ocular.main.OcularRunnable.doMain(OcularRunnable.java:25)
at edu.berkeley.cs.nlp.ocular.main.TrainFont.main(TrainFont.java:41)
... 6 more

@dhgarrette
Copy link
Collaborator

You should be able to give the JVM more heap space with the -Xmx flag.

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