MCPcopy Create free account
hub / github.com/Standard-Intelligence/hertz-dev / __init__

Method __init__

ioblocks.py:27–35  ·  view source on GitHub ↗
(self, c: Config)

Source from the content-addressed store, hash-verified

25 num_components: int
26
27 def __init__(self, c: Config):
28 super().__init__()
29 self.latent_dim = c.latent_dim
30 self.num_components = c.num_components
31 self.input_projection = nn.Linear(c.latent_dim, c.dim)
32
33 self.fc_loc = nn.Linear(c.dim, c.num_components * c.latent_dim)
34 self.fc_scale = nn.Linear(c.dim, c.num_components * c.latent_dim)
35 self.fc_weight = nn.Linear(c.dim, c.num_components)
36
37 def _square_plus(self, x):
38 return (x + T.sqrt(T.square(x) + 4)) / 2

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected