Comments (1)
you can use GetUpdater()->Save(bool save_aux, dmlc::Stream *fo)
in such as sgd_learner.cc
and Save(bool save_aux, dmlc::Stream *fo) should be implemented first
eg: (just a draft)
void SGDUpdater::Save(bool save_aux, dmlc::Stream *fo) const {
int saved = 0;
for (const auto& it : model_) {
if (it.second.Empty()) continue;
int n = param_.V_dim;
fo->Write(&it.first, sizeof(feaid_t));
fo->Write(it.second.w, sizeof(real_t));
if (it.second.V) {
for (int i = 0; i < n; ++i) {
fo->Write(it.second.V[i], sizeof(real_t));
}
}
if (save_aux) {
fo->Write(&(it.second.z), sizeof(real_t));
fo->Write(&(it.second.sqrt_g), sizeof(real_t));
}
saved ++ ;
}
LOG(INFO) << "saved " << saved << " kv pairs";
}
from difacto.
Related Issues (14)
- Error when try to run quick start demo HOT 2
- build on osx with clang
- batch size issue HOT 2
- make error. no matching function for call to 'KVMatch'
- what is relationship between the kv_app(KVWorker, KVServer) and Apps(BCD, LBFGS, SGD)
- Is this project still alive? HOT 6
- Can't run example code HOT 3
- how to run it on multiple machies HOT 1
- where is the output model
- support viewfs
- no row_block.h HOT 1
- Still waiting for distributed implement
- Roadmap
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from difacto.