(self, cfg: Config, *, parent: Optional[Module])
| 145 | ignored_target_id: int = -100 # Value of target that should be ignored. |
| 146 | |
| 147 | def __init__(self, cfg: Config, *, parent: Optional[Module]): |
| 148 | super().__init__(cfg, parent=parent) |
| 149 | cfg = self.config |
| 150 | if hasattr(cfg.inner_head, "input_dim"): |
| 151 | self._add_child("inner_head", cfg.inner_head.set(input_dim=cfg.input_dim)) |
| 152 | else: |
| 153 | self._add_child("inner_head", cfg.inner_head.set(dim=cfg.input_dim)) |
| 154 | self._add_child( |
| 155 | "transform", cfg.transform.set(input_dim=cfg.input_dim, output_dim=cfg.input_dim) |
| 156 | ) |
| 157 | |
| 158 | def _create_layer_parameter_specs(self) -> dict[str, ParameterSpec]: |
| 159 | cfg = self.config |
nothing calls this directly
no test coverage detected