根据PGL的参考文档复制的代码运行有bug提示
收藏
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
收藏
请登录后评论
2.2.3有bug 2.2.5可以