【pytorch_geometric报错】RuntimeError: softmax() Expected a value of type

  如果pytorch_geometric中的softmax函数报错,声明一下num_nodes变量即可。

from
transP = softmax(pipj, row, cd.size(0))
to
transP = softmax(pipj, row, num_nodes = cd.size(0))

[1]RuntimeError: softmax() Expected a value of type ‘Optional[Tensor]’ for argument ‘ptr’ but instead found type ‘int’ #1

你可能感兴趣的:(报错专栏)