OutOfMemoryError
Closed this issue · 1 comments
I am getting OutOfMemoryError.
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at com.github.tjake.rbm.minst.MinstDatasetReader.nextElement(MinstDatasetReader.java:150)
at com.github.tjake.rbm.minst.MinstDatasetReader.createTrainingSet(MinstDatasetReader.java:64)
at com.github.tjake.rbm.minst.MinstDatasetReader.(MinstDatasetReader.java:40)
at com.github.tjake.rbm.minst.BinaryMinstRBM.(BinaryMinstRBM.java:31)
at com.github.tjake.rbm.minst.BinaryMinstRBM.start(BinaryMinstRBM.java:171)
at com.github.tjake.rbm.minst.Demo.main(Demo.java:23)
I tried using -Xmx4096m (and higher too), but still having the same issue.
This causes the issue:
new int[rows * cols];
(rows=83887105 cols=151126275)
Any fix?
Nevermind - I was swapping images with labels !! Duh! Loved the blog !