MCPcopy Create free account
hub / github.com/computational-imaging/bacon / __init__

Method __init__

modules.py:104–117  ·  view source on GitHub ↗
(self, hidden_size, out_size, n_layers, weight_scale,
                 bias=True, output_act=False)

Source from the content-addressed store, hash-verified

102class MFNBase(nn.Module):
103
104 def __init__(self, hidden_size, out_size, n_layers, weight_scale,
105 bias=True, output_act=False):
106 super().__init__()
107
108 self.linear = nn.ModuleList(
109 [nn.Linear(hidden_size, hidden_size, bias) for _ in range(n_layers)]
110 )
111
112 self.output_linear = nn.Linear(hidden_size, out_size)
113
114 self.output_act = output_act
115
116 self.linear.apply(mfn_weights_init)
117 self.output_linear.apply(mfn_weights_init)
118
119 def forward(self, model_input):
120

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected