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

RnnSequenceClassifier has null model after deserialization #74

Open
ooogood opened this issue Jul 18, 2022 · 0 comments
Open

RnnSequenceClassifier has null model after deserialization #74

ooogood opened this issue Jul 18, 2022 · 0 comments

Comments

@ooogood
Copy link

ooogood commented Jul 18, 2022

Describe the bug
RnnSequenceClassifier's member variable "isInitializationFinished" is not set at the end of member method "initializeClassifier(Instances data)".
Similar to the Dl4jMlpClassifier::initializeClassifier(Instances data), it should call Dl4jMlpClassifier::finishClassifierInitialization() at the end.

Otherwise, the "isInitializationFinished" flag will remain false, and the deserialized RnnSequenceClassifier object will have a null model. (Because in Dl4jMlpClassifier::writeObject, if the flag is not true, the model won't be serialized into the object file.)

To Reproduce
Steps to reproduce the behavior:

  1. Train a RnnSequenceClassifier like in this page: https://deeplearning.cms.waikato.ac.nz/examples/train_rnn/
  2. Serialize the classifier with SerializeHelper.write( "path/to/object/file", classifier)
  3. Deserialize the classifier with (RnnSequenceClassifier)SerializeHelper.read( "path/to/object/file" )
  4. The model in the classifier should be null.

Expected behavior
The model in the classifier should be the same as before the serialization.

Screenshots

Additional Information

  • Weka version: 3.8.6
  • wekaDeeplearning4j package version: v1.7.2
  • Operating System: Windows

Additional context

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

1 participant