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

Method __init__

k_diffusion/layers.py:423–426  ·  view source on GitHub ↗
(self, in_features, out_features, std=1.)

Source from the content-addressed store, hash-verified

421
422class FourierFeatures(nn.Module):
423 def __init__(self, in_features, out_features, std=1.):
424 super().__init__()
425 assert out_features % 2 == 0
426 self.register_buffer('weight', torch.randn([out_features // 2, in_features]) * std)
427
428 def forward(self, input):
429 f = 2 * math.pi * input @ self.weight.T

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected