Thanks for letting us know! I think the correct fix is:
change src/GClasses/GSelfOrganizingMap.cpp line 812 from
GDomNode* pNode = pDoc->newObj();
to
GDomNode* pNode = baseDomNode(pDoc, "GSelfOrganizingMap");
and change src/GClasses/GSelfOrganizingMap.cpp line 825 from
GSelfOrganizingMap::GSelfOrganizingMap(GDomNode* pNode){
to
GSelfOrganizingMap::GSelfOrganizingMap(GDomNode* pNode, GLearnerLoader& ll) : GIncrementalTransform(pNode, ll) {
and change src/GClasses/GSelfOrganizingMap.h line 784 from
GSelfOrganizingMap(GDomNode* pNode);
to
GSelfOrganizingMap(GDomNode* pNode, GLearnerLoader& ll);
and change src/dimred/main.cpp line 1136 from
som.reset(new GSelfOrganizingMap(source.root(), ll));
to
GLearnerLoader ll;
som.reset(new GSelfOrganizingMap(source.root(), ll));
and change src/plot/main.cpp line 1247 from
GSelfOrganizingMap som(doc.root());
to
GLearnerLoader ll;
GSelfOrganizingMap som(doc.root(), ll);
Does that make it work for your test case? We should probably also add a unit test that does whatever you did to expose this issue.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
After serializing a trained SOM (tofile), then deserializing (fromfile), the error "train has not been called" is thrown from GTransform.
There are a few TODO's floating around Trainer Strategy serialization.
Is this feature known to be working?
If not, could you give some guidance on the next steps to get test cases for that in the code base?
Thanks for your hard work!
Todd
Thanks for letting us know! I think the correct fix is:
Does that make it work for your test case? We should probably also add a unit test that does whatever you did to expose this issue.
This is a great lead.
I'll investigate a patch and submit. I'm still relatively new to your code base but will extend as soon as I get caught up.
+1 for Github Pull Requests :)
View and moderate all "Help" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Those changes worked like a charm.
I'll find some time in the upcoming week to crank out some unit tests.
Thank you for the hard work on this project.
So far, it is performing extremely well.
Great! Thanks so much for reporting this and testing the fix! I've checked in those changes, now.