-
Notifications
You must be signed in to change notification settings - Fork 266
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
What would be the best way to save a machine learning model parameters ? #35
Comments
Sorry, posted with enter too soon. |
Would the |
Don't know if my understanding is right. Let's use an example here.
I guess you may want do something like In this case, it requires a "serialization" function implemented for type Is that correct? |
@gskapka I didn't think about it that way, that's a great idea thanks ! @dingelish That's exactly what I was looking for, do I have to code my own serialization function in rust then ? |
Personally I would recommend using I think you can try write your own serialization and deserialization algorithm which directly convert an object to a string and vice versa. Meanwhile I'm trying to combine serde suites to rusty-machine and its dependencies for a more general solution (but may slower). |
87f663d is a candidate to support ser/de in knn @MasterDimensio please check if this is what you want. Please be cautious that this kind of serialization would lost precision on float numbers! and cannot work on My solution to this kind of problem is to convert floats to u32 or u64 bytes. I've done this in the sgxwasm project. The I think similar solution could be adopted in this scenario. Need more work on |
7334c30 provides more ser/de in rusty-machine. Now only the NN model is incomplete because it depends on trait objects which are not suitable for ser/de. The current solution leverages Test cases wanted. |
Wow thank you so much for that ! I'm currently travelling but I should be able to test all of this by the end of the week, I'll keep you updated by Monday ! |
This seems to work for me, at least for K-means and logistic regression, which were the ones I needed. Thanks a lot ! |
No description provided.
The text was updated successfully, but these errors were encountered: