MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / forward

Method forward

k_diffusion/layers.py:309–312  ·  view source on GitHub ↗
(self, input, cond)

Source from the content-addressed store, hash-verified

307 nn.init.zeros_(self.mapper.bias)
308
309 def forward(self, input, cond):
310 weight, bias = self.mapper(cond[self.cond_key]).chunk(2, dim=-1)
311 input = F.group_norm(input, self.num_groups, eps=self.eps)
312 return torch.addcmul(utils.append_dims(bias, input.ndim), input, utils.append_dims(weight, input.ndim) + 1)
313
314
315# Attention

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected