def from_pretrained(
        cls, model: SignalJEPA, n_outputs: int, n_spat_filters: int = 4
    ):
        """Instantiate a new model from a pre-trained :class:`SignalJEPA` model.

        Parameters
        ----------
        model: SignalJEPA
            Pre-trained model.
        n_outputs: int
            Number of classes for the new model.
        n_spat_filters: int
            Number of spatial filters.
        chs_info: list of dict | None
            Information about each individual EEG channel. This should be filled with
            ``info["chs"]``. Refer to :class:`mne.Info` for more details.
        """
        feature_encoder = model.feature_encoder
        assert feature_encoder is not None
        new_model = cls(
            n_outputs=n_outputs,
            n_chans=model.n_chans,
            n_times=model.n_times,
            n_spat_filters=n_spat_filters,
            feature_encoder__conv_layers_spec=feature_encoder.conv_layers_spec,
            _init_feature_encoder=False,
        )
        new_model.feature_encoder = deepcopy(feature_encoder)
        return new_model
Instantiate a new model from a pre-trained :class:`SignalJEPA` model.

        Parameters
        ----------
        model: SignalJEPA
            Pre-trained model.
        n_outputs: int
            Number of classes for the new model.
        n_spat_filters: int
            Number of spatial filters.
        chs_info: list of dict | None
            Information about each individual EEG channel. This should be filled with
            ``info["chs"]``. Refer to :class:`mne.Info` for more details.
        
braindecode/models/signal_jepa.py