-
Notifications
You must be signed in to change notification settings - Fork 97
Add microsaccades to Brain-Score core #492
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
Merged
mschrimpf
merged 45 commits into
brain-score:master
from
benlonnqvist:vision_microsaccades
Mar 7, 2024
Merged
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
4690626
integrate https://github.com/brain-score/model-tools/pull/75 to brai…
benlonnqvist 26ed57a
Merge branch 'brain-score:master' into vision_microsaccades
benlonnqvist 1fee011
retrigger
benlonnqvist 26313aa
retrigger
benlonnqvist 71ba207
add exception for when temp file write fails
benlonnqvist 3ea9a9c
fix error with tf temp file management
benlonnqvist 3203e7b
add bandaid to a DataAssembly index problem
benlonnqvist a2e0a15
retrigger
benlonnqvist c1abd95
move microsaccades to the model side
benlonnqvist e690b4e
update comments
benlonnqvist 5ad9863
Merge branch 'brain-score:master' into vision_microsaccades
benlonnqvist e05d815
remove indexing bug
benlonnqvist 903d3f5
Merge branch 'vision_microsaccades' of https://github.com/benlonnqvis…
benlonnqvist 629884e
fix bug with activations.shape
benlonnqvist 0226495
Apply suggestions from code review
benlonnqvist 307735d
Delete brainscore_vision/data/scialom2024/__init__.py
benlonnqvist e13391a
address review changes
benlonnqvist e79fbd2
remove needless import
benlonnqvist a17c653
fix bug with temporary file handling test
benlonnqvist 4887728
assume number_of_trials=1 and require_variance=False when getting sto…
benlonnqvist 9a7368e
fix bug with access to ActivationsExtractorHelper.set_visual_degrees
benlonnqvist b3e08fb
move extractor calls to ModelCommitment generic
benlonnqvist 849cc7a
add check for whether activations_model exists
benlonnqvist 114110c
fix bug with TestVisualDegrees
benlonnqvist 218dead
add link to BrainModel issue
benlonnqvist ce56473
remove shifts from stimulus set packaging
benlonnqvist 65c658b
change link signatures
benlonnqvist 22d2ecb
change microsaccade call signature
benlonnqvist 2e96e73
microsaccades are now computed on both a pixel and degree basis
benlonnqvist 926778c
Apply suggestions from code review
benlonnqvist f7a0340
fix outdated comments, type hints, etc.
benlonnqvist 5a8881d
change function call to reduce repetition
benlonnqvist 2655ecf
add kwargs to microsaccade helpers
benlonnqvist 232f4d7
refactor microsaccade usage to their own class to improve readability
benlonnqvist 06e4b4c
refactor microsaccade coords into MicrosaccadeHelper
benlonnqvist 18e48ae
refactor microsaccade building
benlonnqvist 954b4cc
change the way MultiIndex is set
benlonnqvist 52596ac
fix tf/pytorch/keras bug with image shape calculation
benlonnqvist 9245cb4
cv2 reshaping in translate
benlonnqvist ead4cee
add test for exact microsaccades
benlonnqvist 63990cf
fix microsaccade indexing
benlonnqvist 453a2a6
rename test to be in line with current naming
benlonnqvist 6e92878
add require_variance to _from_paths_stored
benlonnqvist 9a67b15
reduce unnecessarily long test times by reducing the number of trials…
benlonnqvist 0dad5e5
Merge branch 'brain-score:master' into vision_microsaccades
benlonnqvist File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 10 additions & 1 deletion
11
tests/test_model_helpers/brain_transformation/test___init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,18 @@ | ||
| from unittest.mock import Mock | ||
|
|
||
| from brainscore_vision.model_helpers.brain_transformation import ModelCommitment | ||
| from brainscore_vision.model_helpers.utils import fullname | ||
|
|
||
|
|
||
| class TestVisualDegrees: | ||
| def test_standard_commitment(self): | ||
| brain_model = ModelCommitment(identifier=fullname(self), activations_model=None, | ||
| # create mock ActivationsExtractorHelper with a mock set_visual_degrees to avoid failing set_visual_degrees() | ||
| mock_extractor = Mock() | ||
| mock_extractor.set_visual_degrees = Mock() | ||
| mock_activations_model = Mock() | ||
| mock_activations_model._extractor = mock_extractor | ||
|
|
||
| # Initialize ModelCommitment with the mock activations_model | ||
| brain_model = ModelCommitment(identifier=fullname(self), activations_model=mock_activations_model, | ||
| layers=['dummy']) | ||
| assert brain_model.visual_degrees() == 8 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.