Different namespaces use different encoders, and then concat the output of different encoders as the final representation
| 114 | // Different namespaces use different encoders, and then concat the output of |
| 115 | // different encoders as the final representation |
| 116 | GraphNode* HeterGraphSageEncoder(const id_name_t& id_2_name, |
| 117 | const std::string& prefix, |
| 118 | const std::vector<GroupConfigItem3>& items, |
| 119 | int depth, bool use_neigh_feat, bool sparse, |
| 120 | double relu_alpha, int dim) { |
| 121 | std::vector<GraphNode*> hiddens; |
| 122 | GraphNode* hidden = nullptr; |
| 123 | for (auto& entry : id_2_name) { |
| 124 | auto ns_id = entry.first; |
| 125 | auto ns_name = entry.second; |
| 126 | hidden = GraphSageEncoder(prefix + std::to_string(ns_id) + ns_name, items, |
| 127 | depth, use_neigh_feat, sparse, relu_alpha, dim); |
| 128 | hiddens.emplace_back(hidden); |
| 129 | } |
| 130 | auto* next_hidden = Concat("", hiddens, 0); |
| 131 | return next_hidden; |
| 132 | } |
| 133 | |
| 134 | } // namespace embedx |
nothing calls this directly
no test coverage detected