(self, config: ViTConfig)
| 356 | |
| 357 | class ViTEncoder(nn.Module): |
| 358 | def __init__(self, config: ViTConfig) -> None: |
| 359 | super().__init__() |
| 360 | self.config = config |
| 361 | self.layer = nn.ModuleList([ViTLayer(config) for _ in range(config.num_hidden_layers)]) |
| 362 | self.gradient_checkpointing = False |
| 363 | |
| 364 | def forward( |
| 365 | self, |