AttributeError: 'Graph' object has no attribute 'node'

Traceback (most recent call last):
  File "src/main.py", line 24, in <module>
    main()
  File "src/main.py", line 18, in main
    clustering_machine.decompose()
  File "/root/userfolder/GCN/ClusterGCN/src/clustering.py", line 38, in decompose
    self.metis_clustering()
  File "/root/userfolder/GCN/ClusterGCN/src/clustering.py", line 56, in metis_clustering
    (st, parts) = metis.part_graph(self.graph, self.args.cluster_number)
  File "/root/userfolder/anaconda3/envs/GCN/lib/python3.5/site-packages/metis.py", line 765, in part_graph
    graph = networkx_to_metis(graph)
  File "/root/userfolder/anaconda3/envs/GCN/lib/python3.5/site-packages/metis.py", line 574, in networkx_to_metis
    for i in H.node:
AttributeError: 'Graph' object has no attribute 'node'

重新安装一下networkx这个模块就行了

pip install networkx==2.3

你可能感兴趣的:(pytorch)