Feature Extraction
Transformers
Safetensors
encoder_things_eeg2
brain-encoding
neuroscience
eeg
vision
things-eeg2
image-to-eeg
custom_code
Instructions to use epfl-neuroai/encoder-things-eeg2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use epfl-neuroai/encoder-things-eeg2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="epfl-neuroai/encoder-things-eeg2", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("epfl-neuroai/encoder-things-eeg2", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download configuration_encoder_things_eeg2.py from epfl-neuroai/encoder-things-eeg2: direct link, hf CLI and curl.
- Browser
- Download file 1.1 kB
-
https://huggingface.co/epfl-neuroai/encoder-things-eeg2/resolve/main/configuration_encoder_things_eeg2.py
- Command line
-
hf download hf://epfl-neuroai/encoder-things-eeg2/configuration_encoder_things_eeg2.py
-
curl -L -o configuration_encoder_things_eeg2.py https://huggingface.co/epfl-neuroai/encoder-things-eeg2/resolve/main/configuration_encoder_things_eeg2.py
1.1 kB
| """``transformers`` configuration of encoder-things-eeg2; the model itself is in ``modeling.py``. | |
| ``config.json`` describes every variant: the shared fields, ``default_variant``, and ``variants`` | |
| (each variant's ``members`` 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 EncoderThingsEEG2Config(PretrainedConfig): | |
| model_type = "encoder_things_eeg2" | |
| def __init__( | |
| self, | |
| default_variant: str = "", | |
| variants: dict | None = None, | |
| subjects: list | None = None, | |
| channels: list | None = None, | |
| time_points: list | None = None, | |
| units: str = "uV", | |
| **kwargs, | |
| ): | |
| super().__init__(**kwargs) | |
| self.default_variant = default_variant | |
| self.variants = variants or {} | |
| self.subjects = subjects or [] | |
| self.channels = channels or [] | |
| self.time_points = time_points or [] | |
| self.units = units | |