MCPcopy
hub / github.com/pyg-team/pytorch_geometric / dense_softmax

Function dense_softmax

test/utils/test_softmax.py:90–92  ·  view source on GitHub ↗
(x, index)

Source from the content-addressed store, hash-verified

88 compiled_softmax = torch.compile(softmax)
89
90 def dense_softmax(x, index):
91 x = x.view(num_nodes, -1, x.size(-1))
92 return x.softmax(dim=-1)
93
94 benchmark(
95 funcs=[dense_softmax, softmax, compiled_softmax],

Callers

nothing calls this directly

Calls 2

viewMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected