Feature Extraction
Transformers
Safetensors
encoder_tvsd
brain-encoding
neuroscience
macaque
electrophysiology
vision
tvsd
things
custom_code
Instructions to use epfl-neuroai/encoder-tvsd with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use epfl-neuroai/encoder-tvsd with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="epfl-neuroai/encoder-tvsd", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("epfl-neuroai/encoder-tvsd", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download configuration_encoder_tvsd.py from epfl-neuroai/encoder-tvsd: direct link, hf CLI and curl.
- Browser
- Download file 966 Bytes
-
https://huggingface.co/epfl-neuroai/encoder-tvsd/resolve/main/configuration_encoder_tvsd.py
- Command line
-
hf download hf://epfl-neuroai/encoder-tvsd/configuration_encoder_tvsd.py
-
curl -L -o configuration_encoder_tvsd.py https://huggingface.co/epfl-neuroai/encoder-tvsd/resolve/main/configuration_encoder_tvsd.py
966 Bytes
| """``transformers`` configuration of encoder-tvsd; the model itself is in ``modeling.py``. | |
| ``config.json`` describes every variant: the shared fields, ``default_variant``, and ``variants`` | |
| (each variant's ``members``, ``areas`` and ``scores``). There is deliberately no ``variant`` | |
| attribute: ``AutoModel.from_pretrained(..., variant="tiny")`` must reach the model class, which picks | |
| the variant and its weight file. | |
| """ | |
| from transformers import PretrainedConfig | |
| class EncoderTVSDConfig(PretrainedConfig): | |
| model_type = "encoder_tvsd" | |
| def __init__( | |
| self, | |
| default_variant: str = "", | |
| variants: dict | None = None, | |
| monkeys: list | None = None, | |
| electrode_index: dict | None = None, | |
| **kwargs, | |
| ): | |
| super().__init__(**kwargs) | |
| self.default_variant = default_variant | |
| self.variants = variants or {} | |
| self.monkeys = monkeys or [] | |
| self.electrode_index = electrode_index or {} | |