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

Serialization issue with Word2Vec #102

Closed
ElanHR opened this issue Dec 20, 2014 · 2 comments
Closed

Serialization issue with Word2Vec #102

ElanHR opened this issue Dec 20, 2014 · 2 comments

Comments

@ElanHR
Copy link

ElanHR commented Dec 20, 2014

Since migrating from 0.0.3.2.6-SNAPSHOT to 0.0.3.2.8-SNAPSHOT I've been receiving the following error when trying to serialize Word2Vec object:

Word2Vec vec = new Word2Vec.Builder().minWordFrequency(5).vocabCache(cache)
.windowSize(5)
.layerSize(100).iterate(iter).tokenizerFactory(tokenizer)
.build();
vec.setCache(cache);
vec.fit();

SerializationUtils.saveObject(vec, new File(VEC_PATH));

Exception in thread "main" java.lang.RuntimeException: java.io.NotSerializableException: akka.actor.ActorSystemImpl
at org.deeplearning4j.util.SerializationUtils.saveObject(SerializationUtils.java:88)
at org.deeplearning4j.word2vec.Word2VecExample.train(Word2VecExample.java:88)
at org.deeplearning4j.word2vec.Word2VecExample.main(Word2VecExample.java:58)
Caused by: java.io.NotSerializableException: akka.actor.ActorSystemImpl
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1183)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1547)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1508)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1431)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347)
at org.deeplearning4j.util.SerializationUtils.saveObject(SerializationUtils.java:83)

@agibsonccc
Copy link
Contributor

Hi,

Would you mind pulling from the repo again? I have made the textvectorizer transient which should fix this.

Thanks!

nightscape pushed a commit to nightscape/deeplearning4j that referenced this issue Jul 4, 2018
@lock
Copy link

lock bot commented Jan 22, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants