(self, config: CLIPTextConfig)
| 196 | """Implements the text encoder transformer from CLIP.""" |
| 197 | |
| 198 | def __init__(self, config: CLIPTextConfig): |
| 199 | super().__init__() |
| 200 | self.embeddings = TextEmbeddings(config) |
| 201 | self.encoder = Encoder(config) |
| 202 | self.final_layer_norm = nn.LayerNorm(config.hidden_size) |
| 203 | |
| 204 | def __call__(self, x: mx.array) -> CLIPTextOutput: |
| 205 | B, N = x.shape |
nothing calls this directly
no test coverage detected