MCPcopy Create free account
hub / github.com/294coder/Dif-PAN / forward

Method forward

models/unet_model_google.py:49–54  ·  view source on GitHub ↗
(self, input)

Source from the content-addressed store, hash-verified

47 self.register_buffer("inv_freq", inv_freq)
48
49 def forward(self, input):
50 shape = input.shape
51 sinusoid_in = torch.ger(input.view(-1).float(), self.inv_freq)
52 pos_emb = torch.cat([sinusoid_in.sin(), sinusoid_in.cos()], dim=-1)
53 pos_emb = pos_emb.view(*shape, self.dim)
54 return pos_emb
55
56
57class Swish(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected