Skip to content

Incorrect Expected Result in test_logsumexp_out Unit Test for torch_scatter.scatter_logsumexp #490

@finalyXG

Description

@finalyXG

Hi team,

I am running the below unit test in "//pytorch_scatter/test/composite/test_logsumexp.py", and the test case is failed.

def test_logsumexp_out():
    src = torch.tensor([-1.0, -50.0])
    index = torch.tensor([0, 0])
    out = torch.tensor([-10.0, -10.0])
    scatter_logsumexp(src=src, index=index, out=out)
    assert out.allclose(torch.tensor([-0.9999, -10.0]), atol=1e-4)

I find the "out" is tensor([-0.9999, 0.0000]), not close to the expected tensor "torch.tensor([-0.9999, -10.0])".

any ideas about it?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions