(self)
| 77 | return flops |
| 78 | |
| 79 | def reset_parameters(self): |
| 80 | k = 1 / (self.in_chans * (self.patch_size[0] ** 2)) |
| 81 | nn.init.uniform_(self.proj.weight, -math.sqrt(k), math.sqrt(k)) |
| 82 | if self.proj.bias is not None: |
| 83 | nn.init.uniform_(self.proj.bias, -math.sqrt(k), math.sqrt(k)) |
| 84 | |
| 85 | |
| 86 | class RopePositionEmbedding(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected