GraphSage-Encoder use_id=true,use_feature=true,embedding是怎么更新的呢?
- Dominant language
- C++
- Stars
- 2.9k
- Forks
- 553
- PR merge metrics
- No merged PRs in 30d
Description
**base_layers.py中:embedding 的call**
def call(self, inputs):
shape = inputs.shape
inputs = tf.reshape(inputs,[-1])
output_shape = shape.concatenate(self.dim)
output_shape = [d if d is not None else -1 for d in output_shape.as_list()] #//tensorshape->[,,] list
return tf.reshape(tf.nn.embedding_lookup(self.embeddings, inputs),output_shape)
**GraphSage-ShallowEncoder encoder中**
def call(self, inputs):
input_shape = inputs.shape
inputs = tf.reshape(inputs, [-1])
embeddings = []
if self.use_id:
embeddings.append(self.embedding(inputs))
if self.use_feature:
features = sample.get_dense_feature(inputs)
features = tf.concat(features, -1)
if self.combiner == 'add':
features = self.dense(features)
embeddings.append(features)
只看到去读self.embedding的代码。没有看到每个id的embedding何时更新啊。但是ScaleableGraphSage encoder就有去更新embedding的代码。
def _update_store(self, node, node_embeddings):
update_ops = []
for store, node_embedding in zip(self.stores, node_embeddings):
update_ops.append(
utils_embedding.embedding_update(store, node, node_embedding))
return tf.group(*update_ops)
**### 那GraphSage中这个node的embedding是何时更新的呢?**
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in base_layers.py with the embedding call and the GraphSage-ShallowEncoder call, then compare them with the ScaleableGraphSage encoder's _update_store entry point. Trace where the embedding values are supplied during training; done means documenting when and how the node embeddings are updated, with the relevant entry points identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, tensorflow
- Domain
- machine-learning
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100