根据PGL的参考文档复制的代码运行有bug提示
收藏
快速回复
AI Studio平台使用 问答其他 284 1
根据PGL的参考文档复制的代码运行有bug提示
收藏
快速回复
AI Studio平台使用 问答其他 284 1

import numpy as np
import pgl

num_nodes = 5
edges = [ (0, 1), (1, 2), (3, 4)]
feature = np.random.randn(5, 100).astype(np.float32)
edge_feature = np.random.randn(3, 100).astype(np.float32)
graph = pgl.Graph(num_nodes=num_nodes,
edges=edges,
node_feat={
"feature": feature
},
edge_feat={
"edge_feature": edge_feature
})
graph.tensor()

model = pgl.nn.GCNConv(100, 100)
out = model(graph, graph.node_feat["feature"])

 

上面是参考文档的代码

下面是报错的提示

ValueError: (InvalidArgument) scatter(): argument (position 4) must be bool, but got str (at ../paddle/fluid/pybind/op_function_common.cc:140)

请问这个是什么问题呢?

0
收藏
回复
全部评论(1)
时间顺序
v
v-shaoningli
#2 回复于2023-08

2.2.3有bug 2.2.5可以

0
回复
在@后输入用户全名并按空格结束,可艾特全站任一用户