alibaba / alibaba/euler

GraphSage无监督算法为何需要设置feature_idx和feature_dim两个参数?

Open
#124 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.9k
Forks
553
PR merge metrics
No merged PRs in 30d

Description

Hello,
我们使用Graphsage算法模型训练,由于我们训练数据没有稠密特征,所以,训练时没有设置--feature_idx --feature_dim 这两个参数,运行的过程中有以下报错:

File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 571, in _apply_op_helper
(input_name, op_type_name, len(values), num_attr.minimum))
ValueError: List argument 'values' to 'ConcatV2' Op with length 0 shorter than minimum length 2.

而将feature_idx和feature_dim设置成-1和0时(--feature_idx -1 --feature_dim 0),同样出现如下错误:
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py", line 571, in _apply_op_helper
(input_name, op_type_name, len(values), num_attr.minimum))
ValueError: List argument 'values' to 'ConcatV2' Op with length 0 shorter than minimum length 2.

当将feature_idx设置成0,feature_dim设置成0时,出现如下错误:
InvalidArgumentError (see above for traceback): Reshape cannot infer the missing input size for an empty tensor unless all specified input sizes are non-zero
[[node supervisedgraphsage_1/sageencoder_1/shallowencoder_1/Reshape_1 (defined at /opt/euler-0.1.2/tf_euler/python/encoders.py:162) ]]

@yangsiran 所以,想咨询一下,对应训练数据没有稠密特征,如何使用Graphsage算法进行训练?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the GraphSage feature_idx and feature_dim handling in tf_euler/python/encoders.py at line 162, then reproduce the reported empty-feature cases. Compare the resulting ConcatV2 and Reshape failures and determine the supported behavior for training without dense features; done means the valid configuration or required limitation is documented and the errors are addressed or clearly explained.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.