MCPcopy Create free account
hub / github.com/MarcCoru/locationencoder / __init__

Method __init__

locationencoder/nn/siren.py:104–115  ·  view source on GitHub ↗
(self, dim_in, dim_hidden, num_layers)

Source from the content-addressed store, hash-verified

102
103class Modulator(nn.Module):
104 def __init__(self, dim_in, dim_hidden, num_layers):
105 super().__init__()
106 self.layers = nn.ModuleList([])
107
108 for ind in range(num_layers):
109 is_first = ind == 0
110 dim = dim_in if is_first else (dim_hidden + dim_in)
111
112 self.layers.append(nn.Sequential(
113 nn.Linear(dim, dim_hidden),
114 nn.ReLU()
115 ))
116
117 def forward(self, z):
118 x = z

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected