MCPcopy Create free account
hub / github.com/DeepGraphLearning/DiffPack / forward

Method forward

diffpack/layer.py:30–38  ·  view source on GitHub ↗
(self, input, sigma)

Source from the content-addressed store, hash-verified

28 self.mlp = layers.MLP(input_dim + sigma_dim, hidden_dims, short_cut=True)
29
30 def forward(self, input, sigma):
31 sigma_embed = self.embed_func(sigma)
32 if self.operation == "post_add":
33 hidden = self.mlp(input)
34 hidden = hidden + self.sigma_linear(sigma_embed)
35 return hidden
36 elif self.operation == "pre_concat":
37 hidden = self.mlp(torch.cat([input, sigma_embed], dim=1))
38 return hidden
39
40
41class SinusoidalEmbedding(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected