Comments (13)
So, in other words you had vocab approximately around 3m words, and vector size = 900.
That gives us at least 22GB of ram for model. What kind of magic do you expect there? You can't fit that into 6GB ram.
p.s. and i'm yet to see your full stack trace.
p.p.s please use original dl4j repo for bug reports: https://github.com/deeplearning4j/deeplearning4j/issues
from deeplearning4j-examples.
You just repeated what I have posted as an issue !! Well done...
The magic I am expecting my friend is some sort of data parallelization (Will be happy to discuss this on dl4j repo as you have requested)
log4j:WARN No appenders could be found for logger (org.deeplearning4j.models.embeddings.loader.WordVectorSerializer).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
java.lang.OutOfMemoryError: GC overhead limit exceeded
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2041)
at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
at java.lang.Double.parseDouble(Double.java:538)
at com.fasterxml.jackson.core.io.NumberInput.parseDouble(NumberInput.java:285)
at com.fasterxml.jackson.core.util.TextBuffer.contentsAsDouble(TextBuffer.java:392)
at com.fasterxml.jackson.core.base.ParserBase._parseSlowFloat(ParserBase.java:818)
at com.fasterxml.jackson.core.base.ParserBase._parseNumericValue(ParserBase.java:797)
at com.fasterxml.jackson.core.base.ParserBase.getDoubleValue(ParserBase.java:714)
at com.fasterxml.jackson.databind.deser.std.StdDeserializer._parseDoublePrimitive(StdDeserializer.java:669)
at com.fasterxml.jackson.databind.deser.std.PrimitiveArrayDeserializers$DoubleDeser.deserialize(PrimitiveArrayDeserializers.java:513)
at com.fasterxml.jackson.databind.deser.std.PrimitiveArrayDeserializers$DoubleDeser.deserialize(PrimitiveArrayDeserializers.java:492)
at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:538)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:99)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:238)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:118)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3066)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2161)
at org.deeplearning4j.models.word2vec.wordstore.VocabularyWord.fromJson(VocabularyWord.java:105)
at org.deeplearning4j.models.embeddings.loader.WordVectorSerializer.loadFullModel(WordVectorSerializer.java:491)
at com.inmobi.miip.ai.ContextMatch$.main(ContextMatch.scala:12)
at com.inmobi.miip.ai.ContextMatch.main(ContextMatch.scala)
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:497)
at scala.reflect.internal.util.ScalaClassLoader$$anonfun$run$1.apply(ScalaClassLoader.scala:70)
at scala.reflect.internal.util.ScalaClassLoader$class.asContext(ScalaClassLoader.scala:31)
at scala.reflect.internal.util.ScalaClassLoader$URLClassLoader.asContext(ScalaClassLoader.scala:101)
at scala.reflect.internal.util.ScalaClassLoader$class.run(ScalaClassLoader.scala:70)
at scala.reflect.internal.util.ScalaClassLoader$URLClassLoader.run(ScalaClassLoader.scala:101)
at scala.tools.nsc.CommonRunner$class.run(ObjectRunner.scala:22)
at scala.tools.nsc.ObjectRunner$.run(ObjectRunner.scala:39)
preetham-2:miip preetham.venkatesh$
from deeplearning4j-examples.
Should I repost this in the dl4j repo?
from deeplearning4j-examples.
Sorry, but what kind of data parallelization you could expect for single vocabulary-pattern object? It's meant to be loaded and being able to fit into memory.
Sure, you can use text serialization (not a writeFullModel, but writeWordVectors), and save that, say, to HDFS output stream, and then load that as RDD. But at the end of day w2v object is meant to be loaded into your memory.
from deeplearning4j-examples.
One more question: you had built that model on the same machine, or on other one?
from deeplearning4j-examples.
Given the objective function is still maximizing the log probability of the context word, while this is tricky, I guess, it may not be impossible to load the vector spaces in RDD across machines with a softmax gating function for optimization (Assuming the optimization is hierarchical softmax implementation)... There can be several ways to distribute the model into RDD and represent the vector space...
The funny thing is that the model was built on the same machine (I know why you are asking this question and I was about to come to that)... So it fit the memory in the first place (A smaller corpus for test before the entire corpus was tested.) The model for the smaller corpus now does not load back in the same machine (To repeat, the corpus dataset and the model was exactly from the same machine)...
from deeplearning4j-examples.
So, we have two issues then:
- You're asking about something like a parameter server for w2v.
- Model isn't able to load on the same machine it was built.
Issue nr.2:
Can i see gist with your source code please? I need full source code that caused exception you've posted before.
from deeplearning4j-examples.
Hi,
-
Yes on this
-
Will attach a gist (Its really simple what I a trying)...
from deeplearning4j-examples.
@vvpreetham we plainly don't have a parameter server. You're expecting a whole feature most DL frameworks aren't even close to implementing that's easy AND out of the box. We are in the process of integrating one but don't expect it as a first priority atm.
from deeplearning4j-examples.
https://gist.github.com/vvpreetham/5562c8cfd0527a29c1ee
from deeplearning4j-examples.
Closing this. This is equivalent to you wanting us to build a parameter server. Specify more heap space. For now this is working as intended. It's not ideal - but frankly it's an edge case most people don't have.
from deeplearning4j-examples.
The first part yes, the second part is not... If the model fits in memory at the time of creation, it should load as well correct ?
from deeplearning4j-examples.
Second part here (for closure) : deeplearning4j/deeplearning4j#1185
from deeplearning4j-examples.
Related Issues (20)
- Fix links to examples in documentation HOT 1
- 'NoAvailableBackendException' occur when running project on the android studio emulator HOT 1
- Android Example fails due to MainActivity's ClassNotFoundException HOT 3
- Hyperparameter tuning example missing HOT 3
- IndexOutOfBoundsException when importing onnx model
- DL4J uses SharedTrainingMaster on spark and reports "ERROR - publicationUnblockTimeoutNs=15000000000 <= clientLivenessTimeoutNs=30000000000" HOT 6
- Make a Moudle compiler HOT 1
- YOLO HOT 1
- Issue executing GenerateTxtCharCompGraphModel.java HOT 6
- dl4j-examples - clean build failure HOT 1
- load keras saved .pb file model throw exception HOT 1
- UnsupportedClassVersionError HOT 1
- Potential Cuda issue with 4070 cards HOT 4
- org.nd4j:nd4j-cuda-10.2-platform:jar:1.0.0-M2.1 was not found in https://repo.maven.apache.org/maven2 during a previous attempt.
- The provided RNNEmbedding Example does not work, on 1.0.0-M2.1 release HOT 1
- Downloading training data results in 403 HOT 10
- RNNEmbedding IllegalStateException
- NaNs during training when running the TinyYoloHouseNumberDetection example
- rl4j-examples project folder is missing HOT 4
- Request for Scala Tutorials and Jupyter Notebook Formats HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deeplearning4j-examples.