使用PyG的库做edgepool 如下:
edge_pool = EdgePooling(100)
print(graph_list[0].x)
x, edge_index, batch, unpool_info = edge_pool(graph_list[0].x, graph_list[0].edge_index, graph_list[0].batch)
但是总是报错:
TypeError: empty_like(): argument 'input' (position 1) must be Tensor, not NoneType
可是graph_list[0].x(如下)
tensor([[ 0.5176, 0.5349, 0.5168, ..., 0.5573, 0.5475, 0.5565],
[ 0.0789, 0.0510, 0.0137, ..., -0.0471, -0.0310, -0.0098],
[-0.0448, -0.0254, -0.0743, ..., -0.0065, -0.0065, 0.0106],
...,
[ 0.2764, 0.2764, -0.3936, ..., 0.1089, 0.1089, -0.0486],
[-0.1941, -0.1941, 0.2421, ..., -0.1793, -0.1793, -0.2237],
[-0.3793, -0.3793, -0.3901, ..., -0.3392, -0.3392, -0.3323]])
它就是tensor类型啊?
尝试了很多方法就是不对,请求指点?万分感谢!