문제 설명
그래프 노드 간의 메시지 흐름을 위한 Python 함수 (Python function for message flow between nodes of a graph)
이웃에게 노드 기능과 같은 노드에 대한 정보를 보낼 수 있는 Python 기능을 아는 사람이 있습니까? 예: 노드 ID 공유(예: 노드 3(예: 주소))를 이웃과 공유(예: 노드 2). 간단한 그래프
nodes = [n for n in table][1:]
node_names = [n[0] for n in nodes]
edgeList = [(1,3), (2,4), (2,3), (3,4)]
G = nx.Graph() #Creates an empty graph with no nodes and no edges
G.add_nodes_from(node_names) #adds nodes to the empty graph G
G.add_edges_from(edgeList)
참조 솔루션
방법 1:
There are few packages that you can try. (1) StellarGraph if you use Tensorflow/Keras, (2) DAG if you use PyTorch and (3) DGL for Tehsorflow & PyTorch. I believe these 3 libraries are able to help.
방법 2:
Another library with many GNNs implemented is pytorch‑geometric
, which is based on PyTorch. See the introduction or the overview of implemented GNNs, here.
(by Martin Wafula、DaCard、Sparky05)