(一)scatter_add()报错
scatter_add() expected at most 5 argument(s) but received 6 argument(s).
代码出错在这一行:
out = op(src, index, 0, None, dim_size, fill_value)
对比提示的Declaration: scatter_add(Tensor src, Tensor index, int dim=-1, Tensor? out=None, int? dim_size=None) -> (Tensor)
最后一个参数fill-value没有了。
修改调用方式:
out = op(src, index, 0, None, dim_size)