(self)
| 22 | self.register_buffer("identity", torch.tensor([1.0, 0.0, 0.0, 0.0, 1.0, 0.0])) |
| 23 | |
| 24 | def zero_init(self): |
| 25 | torch.nn.init.zeros_(self.embeds.weight) |
| 26 | |
| 27 | def random_init(self, std: float): |
| 28 | torch.nn.init.normal_(self.embeds.weight, std=std) |