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

brain-score.org submission (user:121) | (public:False) #1253

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions brainscore_vision/models/resnext101_32x48d_wsl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
from brainscore_vision.model_helpers.brain_transformation import ModelCommitment
from .model import get_model, get_layers

model_registry['resnext101_32x48d_wsl'] = lambda: ModelCommitment(identifier='resnext101_32x48d_wsl',
activations_model=get_model('resnext101_32x48d_wsl'),
layers=get_layers('resnext101_32x48d_wsl'))
model_registry['resnext101_32x48d_wsl_TEST'] = lambda: ModelCommitment(identifier='resnext101_32x48d_wsl_TEST',
activations_model=get_model('resnext101_32x48d_wsl_TEST'),
layers=get_layers('resnext101_32x48d_wsl_TEST'))
6 changes: 3 additions & 3 deletions brainscore_vision/models/resnext101_32x48d_wsl/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@


def get_model(name):
assert name == 'resnext101_32x48d_wsl'
model_identifier = "resnext101_32x48d_wsl"
assert name == 'resnext101_32x48d_wsl_TEST'
model_identifier = "resnext101_32x48d_wsl_TEST"
model = torch.hub.load('facebookresearch/WSL-Images', model_identifier)
preprocessing = functools.partial(load_preprocess_images, image_size=224)
batch_size = {8: 32, 16: 16, 32: 8, 48: 4}
Expand All @@ -22,7 +22,7 @@ def get_model(name):


def get_layers(name):
assert name == 'resnext101_32x48d_wsl'
assert name == 'resnext101_32x48d_wsl_TEST'
return (['conv1'] +
# note that while relu is used multiple times, by default the last one will overwrite all previous ones
[f"layer{block + 1}.{unit}.relu"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
torchvision
torch
torch
4 changes: 2 additions & 2 deletions brainscore_vision/models/resnext101_32x48d_wsl/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

@pytest.mark.travis_slow
def test_has_identifier():
model = brainscore_vision.load_model('resnext101_32x48d_wsl')
assert model.identifier == 'resnext101_32x48d_wsl'
model = brainscore_vision.load_model('resnext101_32x48d_wsl_TEST')
assert model.identifier == 'resnext101_32x48d_wsl_TEST'