question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

torch_geometric.utils.softmax()

See original GitHub issue

❓ Questions & Help

I am getting a Segmentation fault when calling torch_geometric.utils.softmax(src, idx, num_nodes).

I fed in inputs like this:

  • src is torch.Size([1266, 4])
  • idx is torch.Size([1266])
  • num_nodes is 561

Can someone tell me what went wrong please? Or another alternative way to call a similar function so that the code can run? Thank you!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rusty1scommented, Oct 7, 2019

Do you get a segmentation fault when running, e.g., examples/gat.py? If not, this may indicate that your idx tensor contains invalid entries greater than or equal to 561.

0reactions
twjiangcommented, Oct 25, 2020

I just used pip command to install torch_scatter, like: pip install torch_scatter==1.4.0, and it just worked. However, segmentation fault problem still happens when calling function scatter_max() in softmax().

Read more comments on GitHub >

github_iconTop Results From Across the Web

torch_geometric.utils.softmax - PyTorch Geometric
[docs]def softmax(src, index, num_nodes=None): r"""Computes a sparsely evaluated softmax. Given a value tensor :attr:`src`, this function first groups the ...
Read more >
torch_geometric.utils.softmax() · Issue #723 - GitHub
Is there an alternative to the torch_geometric.utils.softmax() that I ... github repo that specifies only working on torch-geometric 1.0.3?
Read more >
Python Examples of torch_geometric.utils.softmax
Python torch_geometric.utils.softmax() Examples. The following are 19 code examples of torch_geometric.utils.softmax(). You can vote up the ones you like or ...
Read more >
torch_geometric中softmax的理解 - CSDN博客
torch_geometric的utils库中的softmax的计算原理可能跟咱一开始所想并不是 ... reduce='max')[index] out = (src - src_max).exp() """ 计算图中每个 ...
Read more >
Hands-On Guide to PyTorch Geometric (With Python Code) -
Example is shown below: data = Data(x=x, edge_index=edge_index.t().contiguous()). You can check out all the utilities of data handling here.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found