Skip to content

java.lang.OutOfMemoryError: Java heap space #10

@haroldfry

Description

@haroldfry

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions