-
Notifications
You must be signed in to change notification settings - Fork 248
Description
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:
- Train a RnnSequenceClassifier like in this page: https://deeplearning.cms.waikato.ac.nz/examples/train_rnn/
- Serialize the classifier with SerializeHelper.write( "path/to/object/file", classifier)
- Deserialize the classifier with (RnnSequenceClassifier)SerializeHelper.read( "path/to/object/file" )
- 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