(self, weight_decay=0.0)
| 228 | return wav_lst |
| 229 | |
| 230 | def get_params(self, weight_decay=0.0): |
| 231 | # add L2 penalty |
| 232 | weights, biases = [], [] |
| 233 | for name, param in self.named_parameters(): |
| 234 | if 'bias' in name: |
| 235 | biases += [param] |
| 236 | else: |
| 237 | weights += [param] |
| 238 | params = [{ |
| 239 | 'params': weights, |
| 240 | 'weight_decay': weight_decay, |
| 241 | }, { |
| 242 | 'params': biases, |
| 243 | 'weight_decay': 0.0, |
| 244 | }] |
| 245 | return params |
| 246 | |
| 247 | if __name__ == '__main__': |
| 248 | import os |
nothing calls this directly
no outgoing calls
no test coverage detected