Skip to content

Deep dive tutorial 2 try to wrap model twice #569

Closed
brain-score/brain-score.web
#247

Description

@YudiXie

In the deep dive tutorial here: https://www.brain-score.org/tutorial/deepdive_2

I found that the example code tries to wrap a Pytorch model twice, and combined with the __init__.py it try to create a ModelCommitment object twice. I found this a little confusing.

40      def get_model(name):
41          assert name == 'my_custom_model'
42          preprocessing = functools.partial(load_preprocess_images, image_size=224)
43          activations_model = PytorchWrapper(identifier='my_custom_model', model=MyCustomModel(), preprocessing=preprocessing)
44          model = ModelCommitment(identifier='my_custom_model', activations_model=activations_model,
45                                  # specify layers to consider
46                                  layers=['conv1', 'relu1', 'relu2'])
47          wrapper = PytorchWrapper(identifier='my_custom_model', model=model, preprocessing=preprocessing)
48          wrapper.image_size = 224
49          return wrapper

Activity

  1. mike-ferguson commented on Feb 22, 2024

    @mike-ferguson
    Member

    @YudiXie you are right again, thanks for letting us know (and for beta testing our tutorial :D). I'll fix it soon

  2. linked a pull request that will close this issueAddresses Issues in tutorial #247on Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions