MCPcopy Create free account
hub / github.com/dmlc/parameter_server / readMatrices

Method readMatrices

src/data/stream_reader.h:193–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191
192template<typename V>
193bool StreamReader<V>::readMatrices(
194 uint32 num_examples, MatrixPtrList<V>* matrices, std::vector<Example>* examples) {
195 num_examples_ = num_examples;
196 examples_ = examples; if (examples_) examples_->clear();
197 matrices_ = matrices; if (matrices_) matrices_->clear();
198 vslots_.resize(data_.ignore_feature_group() ? 2 : kSlotIDmax);
199 bool ret = false;
200 if (data_.format() == DataConfig::TEXT) {
201 ret = readMatricesFromText();
202 } else if (data_.format() == DataConfig::PROTO) {
203 ret = readMatricesFromProto();
204 } else {
205 LL << "unknonw data format: " << data_.DebugString();
206 }
207 vslots_.clear();
208 return ret;
209}
210
211
212} // namespace PS

Callers 3

runMethod · 0.80
readMinibatchMethod · 0.80
startMethod · 0.80

Calls 4

ignore_feature_groupMethod · 0.80
clearMethod · 0.45
resizeMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected