(self)
| 599 | nn.init.normal_(block.mlp[2].weight, std=proj_gain) |
| 600 | |
| 601 | def param_groups(self): |
| 602 | groups = [{ |
| 603 | 'params': [ |
| 604 | p for n, p in self.named_parameters() |
| 605 | if 'norm' in n or n.endswith('bias') |
| 606 | ], |
| 607 | 'weight_decay': 0.0 |
| 608 | }, { |
| 609 | 'params': [ |
| 610 | p for n, p in self.named_parameters() |
| 611 | if not ('norm' in n or n.endswith('bias')) |
| 612 | ] |
| 613 | }] |
| 614 | return groups |
| 615 | |
| 616 | |
| 617 | class XLMRobertaWithHead(XLMRoberta): |
nothing calls this directly
no outgoing calls
no test coverage detected