From 2fd13581dcc1dd3711379eb17eca6890949dd26f Mon Sep 17 00:00:00 2001 From: Kartik Pradeepan Date: Mon, 30 Sep 2024 09:05:07 -0400 Subject: [PATCH] Revert "add resnet50_11ad3fa6 to models (#1282)" This reverts commit 55de4cdf00a8c884bcbcd8239bfa91a133e48d29. --- .../models/resnet50_11ad3fa6/__init__.py | 9 ----- .../models/resnet50_11ad3fa6/model.py | 35 ------------------- .../models/resnet50_11ad3fa6/requirements.txt | 2 -- .../models/resnet50_11ad3fa6/test.py | 8 ----- 4 files changed, 54 deletions(-) delete mode 100644 brainscore_vision/models/resnet50_11ad3fa6/__init__.py delete mode 100644 brainscore_vision/models/resnet50_11ad3fa6/model.py delete mode 100644 brainscore_vision/models/resnet50_11ad3fa6/requirements.txt delete mode 100644 brainscore_vision/models/resnet50_11ad3fa6/test.py diff --git a/brainscore_vision/models/resnet50_11ad3fa6/__init__.py b/brainscore_vision/models/resnet50_11ad3fa6/__init__.py deleted file mode 100644 index cdfd7fa38..000000000 --- a/brainscore_vision/models/resnet50_11ad3fa6/__init__.py +++ /dev/null @@ -1,9 +0,0 @@ -from brainscore_vision import model_registry -from brainscore_vision.model_helpers.brain_transformation import ModelCommitment -from .model import get_model, get_layers - -model_registry['resnet50_11ad3fa6'] = lambda: ModelCommitment( - identifier='resnet50_11ad3fa6', - activations_model=get_model('resnet50_11ad3fa6'), - layers=get_layers('resnet50_11ad3fa6') -) diff --git a/brainscore_vision/models/resnet50_11ad3fa6/model.py b/brainscore_vision/models/resnet50_11ad3fa6/model.py deleted file mode 100644 index 1b4294372..000000000 --- a/brainscore_vision/models/resnet50_11ad3fa6/model.py +++ /dev/null @@ -1,35 +0,0 @@ -from brainscore_vision.model_helpers.check_submission import check_models -import functools -import torchvision.models -from brainscore_vision.model_helpers.activations.pytorch import PytorchWrapper -from brainscore_vision.model_helpers.activations.pytorch import load_preprocess_images - -# This is an example implementation for submitting resnet-50 as a pytorch model - -# Attention: It is important, that the wrapper identifier is unique per model! -# The results will otherwise be the same due to brain-scores internal result caching mechanism. -# Please load your pytorch model for usage in CPU. There won't be GPUs available for scoring your model. -# If the model requires a GPU, contact the brain-score team directly. - - -def get_model(name): - assert name == 'resnet50_11ad3fa6' - model = torchvision.models.resnet50(pretrained=True) - preprocessing = functools.partial(load_preprocess_images, image_size=224) - wrapper = PytorchWrapper( - identifier='resnet50_11ad3fa6', model=model, preprocessing=preprocessing) - wrapper.image_size = 224 - return wrapper - - -def get_layers(name): - assert name == 'resnet50_11ad3fa6' - return ['conv1', 'layer1', 'layer2', 'layer3', 'layer4', 'fc'] - - -def get_bibtex(model_identifier): - return """""" - - -if __name__ == '__main__': - check_models.check_base_models(__name__) diff --git a/brainscore_vision/models/resnet50_11ad3fa6/requirements.txt b/brainscore_vision/models/resnet50_11ad3fa6/requirements.txt deleted file mode 100644 index a56666d38..000000000 --- a/brainscore_vision/models/resnet50_11ad3fa6/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -torchvision -torch \ No newline at end of file diff --git a/brainscore_vision/models/resnet50_11ad3fa6/test.py b/brainscore_vision/models/resnet50_11ad3fa6/test.py deleted file mode 100644 index 28c13e09b..000000000 --- a/brainscore_vision/models/resnet50_11ad3fa6/test.py +++ /dev/null @@ -1,8 +0,0 @@ -import pytest -import brainscore_vision - - -@pytest.mark.travis_slow -def test_has_identifier(): - model = brainscore_vision.load_model('resnet50_tutorial') - assert model.identifier == 'resnet50_tutorial'