Open qihuazhong opened 1 year ago
Yes, it is optional (meaning you can pass in None
) but it does not have a default argument (which is intended).
Yes, it is optional (meaning you can pass in
None
) but it does not have a default argument (which is intended).
It is actually a required argument. If you try to call global_add_pool(x)
it will raise an error saying you didn't pass the batch
argument. It should be given a default value or the docs should be updated to say that it is a required argument.
🐛 Describe the bug
According to the doc (https://pytorch-geometric.readthedocs.io/en/stable/modules/nn.html#torch_geometric.nn.pool.global_add_pool) and the code. The
batch
argument should be optional. However, the default None is not provided in the function signature and would raise an error if not provided.Should be an easy fix by chaning
to
Environment
conda
,pip
, source):torch-scatter
):