MCPcopy Create free account
hub / github.com/Tencent/embedx / FillNodeFeature

Method FillNodeFeature

src/model/data_flow/deep_flow.cc:37–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37void DeepFlow::FillNodeFeature(
38 Instance* inst, const std::string& name, const vec_int_t* nodes_ptr,
39 const std::vector<vec_pair_t>& node_feats_list) const {
40 auto* node_feat_ptr = &inst->get_or_insert<csr_t>(name);
41 node_feat_ptr->clear();
42
43 for (size_t i = 0; i < node_feats_list.size(); ++i) {
44 for (const auto& entry : node_feats_list[i]) {
45 node_feat_ptr->emplace(entry.first, entry.second);
46 }
47
48 if (nodes_ptr) {
49 node_feat_ptr->emplace((*nodes_ptr)[i], 1.0);
50 }
51
52 node_feat_ptr->add_row();
53 }
54}
55
56} // namespace embedx

Callers 13

GetTrainBatchMethod · 0.45
GetPredictBatchMethod · 0.45
GetTrainBatchMethod · 0.45
GetPredictBatchMethod · 0.45
GetTrainBatchMethod · 0.45
GetPredictBatchMethod · 0.45
GetTrainBatchMethod · 0.45
GetTrainBatchMethod · 0.45
GetTrainBatchMethod · 0.45
GetPredictBatchMethod · 0.45
GetTrainBatchMethod · 0.45

Calls 3

emplaceMethod · 0.80
add_rowMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected