meshGraphNets_pytorch
meshGraphNets_pytorch copied to clipboard
issues in utils.utils.py and questions about edge normalization.
Hello. ThanksHello everyone, First of all, thank you for sharing such a good implementation. It seems that there is a bug in the utils.py file in the utils directory. The code is as follows:
# see https://github.com/sungyongs/dpgn/blob/master/utils.py
def decompose_graph(graph):
# graph: torch_geometric.data.data.Data
# TODO: make it more robust
x, edge_index, edge_attr, global_attr = None, None, None, None
for key in graph.keys:
if key=="x":
x = graph.x
elif key=="edge_index":
edge_index = graph.edge_index
elif key=="edge_attr":
edge_attr = graph.edge_attr
elif key=="global_attr":
global_attr = graph.global_attr
else:
pass
return (x, edge_index, edge_attr, global_attr)
There seems to be a missing () in the graph.keys part, which is causing an error. Also, I have a question, not an error. I noticed that in DeepMind's repository, edge normalization is performed, but in your repository's simulator, Edge_normalization is commented out and not implemented separately. I am curious if there is a specific reason for excluding it. Once again, thank you for your efforts.
不知道您是否结局了这个问题,我遇到了类似的地方
信息如下:
root@dbd8511a62f7:/workdisk/meshGraphNets_pytorch# python3 train.py
Simulator model initialized
Optimizer initialized
Dataset /workdisk/data_h5/train.h5 Initilized
Traceback (most recent call last):
File "/workdisk/meshGraphNets_pytorch/train.py", line 54, in