MCPcopy Create free account
hub / github.com/ml-explore/mlx-examples / __init__

Method __init__

llava/vision.py:193–200  ·  view source on GitHub ↗
(self, config: VisionConfig)

Source from the content-addressed store, hash-verified

191
192class VisionModel(nn.Module):
193 def __init__(self, config: VisionConfig):
194 super().__init__()
195
196 self.model_type = config.model_type
197 if self.model_type != "clip_vision_model":
198 raise ValueError(f"Unsupported model type: {self.model_type}")
199
200 self.vision_model = ClipVisionModel(config)
201
202 def __call__(
203 self, x: mx.array, output_hidden_states: Optional[bool] = None

Callers

nothing calls this directly

Calls 2

ClipVisionModelClass · 0.70
__init__Method · 0.45

Tested by

no test coverage detected