-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Machine ref to itself #5145
Machine ref to itself #5145
Conversation
- autoencoder - libsvr
It seems the failing tests haven't to do with my PR in particular, here's a report of failing test cases on develop branch and my branch ** develop **
** machine branch **
This is true atleast in my local machine. This PR should be good to go, I'll let the members make the final call |
I guess maybe there is some |
|
@@ -145,7 +145,7 @@ bool OnlineSVMSGD::train(std::shared_ptr<Features> data) | |||
float64_t wnorm = linalg::dot(m_w, m_w); | |||
io::info("Norm: {:.6f}, Bias: {:.6f}", wnorm, bias); | |||
|
|||
return true; | |||
return shared_from_this()->as<Machine>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could be std::static_pointer_cast, since we know that this
is a derived from Machine
|
||
/* predict */ | ||
auto predicted_labels = | ||
svm->apply(features_test)->as<RegressionLabels>(); | ||
svm->train()->as<LibSVR>()->apply(features_test)->as<RegressionLabels>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this just be svm->train()->apply(features_test)->as<RegressionLabels>();
?
Re-open when devs are back. |
#5139
Eren YEAGEEER!
@gf712 Some unit tests are failing still, submitting as early report.