(self, input, sigma)
| 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 | |
| 41 | class SinusoidalEmbedding(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected