Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added .eval() to HuggingfaceSubject #222

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BKHMSI
Copy link

@BKHMSI BKHMSI commented Nov 22, 2023

Enabled evaluation mode for HF models before passing stimuli. This disables dropout and changes normalisation layers (e.g. BatchNorm) to use averages computed during training. I computed brain alignment with and without .eval() and the results are different!

In the future there needs to be a _PytorchTransformerWrapper like here to enable eval for any PyTorch model and not only HF models: https://github.com/mschrimpf/neural-nlp/blob/6e1a989b24fff0ffd7cac67d880a94136c4b4fb5/neural_nlp/models/implementations.py#L686

enabled evaluation mode for HF models before passing stimuli. This disables dropout and changes normalisation layers (e.g. BatchNorm) to use averages computed during training
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants