Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
闫广庆 42693eb835 | 1 year ago | |
---|---|---|
.. | ||
__init__.py | 1 year ago | |
graph_sage_show.py | 1 year ago | |
readme.md | 1 year ago |
graphsage是一个可以融合本身向量特征及网络特征的一种算法。
通过对graph sage构建数据集过程观察的观察我们可以发现模型的输入有两个特征
from torch_geometric.nn import GraphSAGE
import torch
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
model = GraphSAGE(data.num_node_features, hidden_channels=64,
num_layers=2).to(device)
optimizer = torch.optim.Adam(model.parameters(), lr=0.01)
# batch x 是一个 [批量节点数量,节点特征向量] batch edge_indexs是一个节点-节点之间的关系列表
h = model(batch.x, batch.edge_index)
No Description
Python Markdown
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》