(cls)
| 330 | |
| 331 | @classmethod |
| 332 | def default_config(cls): |
| 333 | cfg: RandomVectorQuantizer.Config = super().default_config() |
| 334 | # Sect 3.1 https://arxiv.org/pdf/2202.01855.pdf. |
| 335 | # Codebook uses standard Gaussian initialization. |
| 336 | cfg.param_init = DefaultInitializer.default_config().set( |
| 337 | init_by_param_name={".*codebook$": GaussianInitializer.default_config().set(std=1.0)} |
| 338 | ) |
| 339 | return cfg |
| 340 | |
| 341 | def __init__(self, cfg: Config, *, parent: Module): |
| 342 | super().__init__(cfg, parent=parent) |
nothing calls this directly
no test coverage detected