[BUG] FIX DRNN load bug#3074
Conversation
Thank you for contributing to
|
|
Is there an issue with the inherited function? If so, wonder why it is not captured by testing. No description to go by. |
|
I don't know why my message did not appear in the original post. I did not notice Yes, the load function is inherited from BaseDeepClusterer, but it uses the basic functionality to "simply" load the model. The Dilated Recurrent NN autoencoder uses a custom module, which needs to be provided to the load function to work properly. That is the change made. This is not necessary for the other deepclusterers because they do not have any particularly special modules. To replicate the bug you can just try training an AEDRNN clusterer on any number of epochs, saving, and loading. |
hadifawaz1999
left a comment
There was a problem hiding this comment.
Good catch, we do this in the end of the fit to load the best model, but didnt think about this other base function, but it also shows we dont test the function... approving this if @MatthewMiddlehurst is okay too cz it solves the issue, but if you're also motivated to PRing a test for the functions of save load in deep clustering would be great too :)
|
Glad to know it might help. In a similar sense than the previous PR on adding the validation_split argument to the deepclusterers, I am only modifying the code that is useful to my research. If I eventually have time, I can get to the testing units, for know I keep to the practical. But if any other contributor find this, feel free to implement, I am sure is pretty straightforward. |
|
Added the same fix to DCNN. I did not notice the custom class until I stepped into the bug, as it was not in the network script, as in the DRNN, but in another module utils.networks.weight_norm. Both should work fine now, as they are for me. |
hadifawaz1999
left a comment
There was a problem hiding this comment.
Added the issue here #3080
Reference Issues/PRs
What does this implement/fix? Explain your changes.
Does your contribution introduce a new dependency? If yes, which one?
Any other comments?
PR checklist
For all contributions
For new estimators and functions
__maintainer__at the top of relevant files and want to be contacted regarding its maintenance. Unmaintained files may be removed. This is for the full file, and you should not add yourself if you are just making minor changes or do not want to help maintain its contents.For developers with write access