| 75 | |
| 76 | |
| 77 | class FourierNet(MFNBase): |
| 78 | def __init__( |
| 79 | self, |
| 80 | in_size, |
| 81 | hidden_size, |
| 82 | out_size, |
| 83 | n_layers=3, |
| 84 | input_scale=256.0, |
| 85 | weight_scale=1.0, |
| 86 | bias=True, |
| 87 | output_act=False, |
| 88 | ): |
| 89 | super().__init__( |
| 90 | hidden_size, out_size, n_layers, weight_scale, bias, output_act |
| 91 | ) |
| 92 | self.filters = nn.ModuleList( |
| 93 | [ |
| 94 | FourierLayer(in_size, hidden_size, input_scale / np.sqrt(n_layers + 1)) |
| 95 | for _ in range(n_layers + 1) |
| 96 | ] |
| 97 | ) |
| 98 | |
| 99 | |
| 100 | def plot_initialization(use_original=False, plot_fit=True): |
no outgoing calls
no test coverage detected