MCPcopy Index your code
hub / github.com/DeepGraphLearning/S3F / rbf

Function rbf

s3f/gvp.py:14–21  ·  view source on GitHub ↗
(d, d_min=0.0, d_max=20.0, dim=16)

Source from the content-addressed store, hash-verified

12
13
14def rbf(d, d_min=0.0, d_max=20.0, dim=16):
15 d_mu = torch.linspace(d_min, d_max, dim, device=d.device)
16 d_mu = d_mu.view([1, -1])
17 d_sigma = (d_max - d_min) / dim
18 d_expand = torch.unsqueeze(d, -1)
19
20 rbf = torch.exp(-((d_expand - d_mu) / d_sigma) ** 2)
21 return rbf
22
23
24@R.register("models.SurfGVP")

Callers 3

surface_feature_initMethod · 0.85
forwardMethod · 0.85
forwardMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected